-
Notifications
You must be signed in to change notification settings - Fork 251
CI: dead code removal check #1983
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
Conversation
Can this create a patch? Or even better suggestions to commit? |
Yes! We can use GitHub Actions like, e.g., |
Not sure to understand if that's the GA which is faulty, otherwise I would gladly use it also to check Nix code formatting / LSP insights too :) I'm not sure if the ReviewDog GA is faulty? Otherwise, I would gladly use it to check Nix code formatting and display LSP insights as well :) |
b0ffce2
to
670a4bb
Compare
303eab1
to
b669463
Compare
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.
Is it supposed to fail if there are warnings? because it didn't
https://github.com/input-output-hk/haskell.nix/actions/runs/5789319513/job/15690115119#step:3:7
I choose to not make a CI test fail, but rather to just display hints in the PR diffs view (that's what https://github.com/reviewdog/action-suggester does). I'm not sure if it's more convenient? |
184f3db
to
7616f56
Compare
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.
Can you make a separate workflow? pipeline.yml
is a bit of a kitchen sink. Maybe move all lints to a new lints.yml
workflow?
Is there anywhere I can see a preview of the output?
Yes! I updated the PR :)
I believe the workflow can't be run unless merged into Btw, I now directly rely on https://github.com/reviewdog/reviewdog?tab=readme-ov-file#diff rather than on my fork (I would prefer to not have to rely on external tooling, but the needed GitHub feature seems missing cli/cli#5905 …) |
5e051b3
to
e76bcac
Compare
b100ffc
to
255f2ad
Compare
This PR adds a CI job that runs the `nix run github:astro/deadnix -- --edit \ --no-lambda-pattern-names` [1] command to detect dead code. And then use reviewdog/action-suggester [2] for actionable code changes comments within GitHub UI. [1] #1756 [2] https://github.com/reviewdog/action-suggester
3713763
to
d42da44
Compare
So I give it a try to it in my fork, and here what's expected: yvan-sraka#1 :) |
This PR adds a CI job that runs the nix run
github:astro/deadnix -- --edit --no-lambda-pattern-names
command to remove dead code. If this command results in any uncommitted changes, the CI job will fail, indicating the presence of dead code in the repository that needs to be removed. See #1756