Skip to content
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

hlint -g also checks untracked files #1592

Open
turion opened this issue May 8, 2024 · 0 comments
Open

hlint -g also checks untracked files #1592

turion opened this issue May 8, 2024 · 0 comments

Comments

@turion
Copy link

turion commented May 8, 2024

It seems that hlint -g not only checks tracked and checked in files, but also files that are untracked.

In #1090 (comment) @ndmitchell said that hlint -g runs git ls-files --cached --others --exclude-standard *.hs *.lhs. But this includes the --others flag, which does, according to the git docs:

   -o, --others
      Show other (i.e. untracked) files in the output

And indeed:

❯ hlint --git -v .
# Execute of /home/turion/.nix-profile/bin/git ls-files --cached --others --exclude-standard *.hs *.lhs... took 0.00s
[...]

I believe this is at odds with what hlint tries to achieve, according to the docs:

 -g --git                                 Run on files tracked by git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant