`typecheck` should ignore `.gitignore`-ed files
Opened this issue · 1 comments
adrien-piquerez-da commented
Is your enhancement request related to a problem? Please describe.
Running haskell-language-server with no argument runs the typecheck command on all haskell files from the working directory recursively. In a repo using Bazel it can find Haskell files from the cache directory, which fails to typecheck.
Describe the solution you'd like
haskell-language-server should not look into the cache directories. To do so it could use .gitignore if it finds one.
Describe alternatives you've considered
An alternative is to specify all relevant sub-directories manually like this:
haskell-language-server typecheck a b c d
Additional context
A similar issue was originally reported in haskell/hie-bios#299
fendor commented
That sounds reasonable to me, PRs welcome!
Changes should be quite isolated in https://github.com/haskell/haskell-language-server/blob/master/ghcide/src/Development/IDE/Main.hs#L385