Clippy Analysis to CI#2979
Conversation
| uses: actions-rs/cargo@v1 | ||
| with: | ||
| command: clippy | ||
|
|
There was a problem hiding this comment.
I was thinking we could add an args: -- -Aclippy::all -Wclippy::specific_lint_name, and thus not need to change the actual source code (like the fmt job above).
There was a problem hiding this comment.
Right that's an option but might not be 100% intuitive to someone why their CI Build is failing when locally it isn't?
There was a problem hiding this comment.
@seanmonstar ^^ My concern is something will fail in CI and not locally .
There was a problem hiding this comment.
I have reverted the change to the main lib file , verified the build is green ! -> https://github.com/mastrzyz/hyperclip/actions/runs/3110424028/jobs/5041594746
There was a problem hiding this comment.
My concern is something will fail in CI and not locally .
I agree that changing the top level module would prevent this, but since we're allowing everything except self_named_module_files, this should be fine.
Although now that I think about it, changing the top level module might not be a bad idea at all 😄
There was a problem hiding this comment.
Hm, I wonder, does this actually need to be -D and not -W? I suppose just a warning won't stop the CI job from exiting successfully. (I believe there's one instance in the repo that should be failing this lint, hence why I wrote the issue, but seems like the job is happy.)
There was a problem hiding this comment.
Shouldn't we make it -D? We want the CI job to fail, not just yell and then get forgotten.
(I would expect this to trigger a complaint about the ext.rs module.)
| #![allow( | ||
| clippy::needless_borrow, | ||
| clippy::module_inception, | ||
| clippy::useless_format, | ||
| clippy::redundant_clone, | ||
| clippy::manual_non_exhaustive | ||
| )] |
There was a problem hiding this comment.
We can avoid adding these lines directly into src/lib.rs with an argument when we call clippy in CI, as in seanmonstar's comment
| uses: actions-rs/cargo@v1 | ||
| with: | ||
| command: clippy | ||
|
|
There was a problem hiding this comment.
Right that's an option but might not be 100% intuitive to someone why their CI Build is failing when locally it isn't?
| uses: actions-rs/cargo@v1 | ||
| with: | ||
| command: clippy | ||
|
|
There was a problem hiding this comment.
@seanmonstar ^^ My concern is something will fail in CI and not locally .
| uses: actions-rs/cargo@v1 | ||
| with: | ||
| command: clippy | ||
|
|
There was a problem hiding this comment.
I have reverted the change to the main lib file , verified the build is green ! -> https://github.com/mastrzyz/hyperclip/actions/runs/3110424028/jobs/5041594746


Enables
Clippyin the CI as a need of the top-levelci-passjob.Resolution for #2977
Disabled the current violations :
And explicitly enabled the one requested one :
Result :
If we have a violation , we would see :