-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Add Clippy to CI build #139
Comments
Is someone working on this? |
Not to my knowledge. @hendrikmaus was working on adjacent build system topics, but he said he's interested in #104. Feel free to pick this up, if you're interested! Please note that there's some discussion about how to add more things to the CI build in #64 that is relevant here too. |
I can recommend to use this step: https://github.com/hendrikmaus/rust-workflows/blob/master/.github/workflows/ci.yaml#L90 Clippy should not run in a matrix, linting the codebase on one OS is enough. |
Basically, we can use the entire workflow here as is https://github.com/hendrikmaus/rust-workflows/blob/master/.github/workflows/ci.yaml |
Thank you, @hendrikmaus, good point! I still want a script with all the essentials ( That doesn't have to be a part of this issue though. I'd be happy to call this complete, if we have warning-free Clippy build that is checked on CI. |
Regarding local checking, I usually run multiple terminals + cargo watch to run clippy and tests on every code change. Those commands are either in my shell history or I have a Justfile or Makefile wrapping them. One could also look into making that setup easier with https://github.com/Canop/bacon which recently released a brand new major version. |
Interesting, I didn't know bacon! Are you using rust-analyzer? Won't those two interfere? I'm using rust-analyzer in VS Code and I wouldn't want to replace it, as it's providing so much more than just |
I am currently using CLion and the Intellij-Rust plugin + Clippy. |
I just installed
Aside: I also run a local instance of Works find for me on a Linux box |
Forget what I wrote above. The workflows for CI and CD can be changed independently. |
@hannobraun The all-in-one script that you mentioned could be made such that the CI would use the same script for the workflows. It would mean only having to maintain the code at one place. What do you think? For now I'll use Clippy independently in the workflow, but the longer term goal can be the one script everywhere. |
That was my first thought, but @hendrikmaus made a good point, that we don't need to run Clippy (or anything else that doesn't actually generate code, like Let's not worry about it too much. What's important in the context of this issue, is that we fix/silence existing Clippy warnings and run it on CI. Eventually, I want to have a local script that tests all the relevant stuff, but we can figure out later, whether that's shared with the actions, or if we have a bit of duplication. Maybe we can designate one of the runners (probably best to use Linux, because that tends to be the fastest one) as the "complete" runner ( |
Yes, I think I also did it in rust-workflows like that. |
Addressed in #208. |
I think it makes sense to add Clippy to the CI build, as it often has valid complaints. However, it shouldn't be added blindly. First, we shouldn't add it, if it causes a million warnings right away. There should be a clean-up first, to make sure all applicable warnings are fixed. Second, if during that clean-up we come across Clippy warnings that aren't applicable, those should be disabled.
Labeling as https://github.com/hannobraun/Fornjot/labels/good%20first%20issue, as this doesn't require a lot of knowledge of Fornjot, and going through the warnings could be a good way to get to know the code base a little.
The text was updated successfully, but these errors were encountered: