-
-
Couldn't load subscription status.
- Fork 409
Rely on gitignore to exclude listed files in ghcide (#4665) #4736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
013cd7b to
5db38c5
Compare
|
I don't think the CI failure is related to my PR. |
Looks like a flaky thing, it fixed itself |
5db38c5 to
4b705d1
Compare
|
Thanks, let's try again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comments, otherwise LGTM!
Unfortunately, there are not automated tests for this cli mode, we'd need to add some, but that's some fair amount of work...
| recurse y | "." `isPrefixOf` takeFileName y = False -- skip .git etc | ||
| recurse y = takeFileName y `notElem` ["dist", "dist-newstyle"] -- cabal directories | ||
| in filter (\y -> takeExtension y `elem` [".hs", ".lhs"]) <$> IO.listFilesInside (return . recurse) x | ||
| (testGitExitCode, _, _) <- readProcessWithExitCode "git" ["status"] "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if git is not installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should fallback to the current implementation
|
|
||
| expandFiles :: [FilePath] -> IO [FilePath] | ||
| expandFiles = concatMapM $ \x -> do | ||
| expandFiles paths = do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the behaviour got more complicated, could you expand the documentation of what this function does?
3ef4d76 to
7957387
Compare
This aimes to fix #4665.
Note that I directly calling
git, as thgitignoreformat is non-trivial.I can roll a partial parsing implementation if requested.