-
Notifications
You must be signed in to change notification settings - Fork 744
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
[ci] Configure clippy to fail on warnings #2669
Conversation
@@ -5,6 +5,7 @@ cargo-clippy: | |||
- .common-refs | |||
- .pipeline-stopper-artifacts | |||
script: | |||
# The removal of `RUSTFLAGS` is related to the configuration of `cargo-clippy` in `.cargo/config.toml`. |
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 we be more specific here?
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.
We could/should, but I don't quite understand the full comment here: https://github.com/paritytech/polkadot-sdk/blob/master/.cargo/config.toml#L7-L12
# An auto defined `clippy` feature was introduced,
# but it was found to clash with user defined features,
# so was renamed to `cargo-clippy`.
#
# If you want standard clippy run:
# RUSTFLAGS= cargo clippy
Maybe we should also change/align that?
@liamaharon @bkchr @ggwpez @alvicsam any suggestions?
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.
also pinging @athei and @gilescope in case they remember https://github.com/paritytech/substrate/pull/9694/files#r716463069
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.
If we've updated the compiler to 1.74 then there's a clippy PR that we can land that removes our usage of the hack in .cargo/config.toml as we can now store lints in the workspace toml file. I think in my PR there's a couple of new crates that need to have their Cargo.tomls tweaked and then it should run green. #2390
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.
@gilescope
Giles, cool, thank you for the comment :)
Do you plan to finish #2390? If not, I could. Just, please, let me know.
CI has 1.74:
$ cargo --version
cargo 1.74.0 (ecb9851af 2023-10-18)
...
$ cargo +nightly --version
cargo 1.75.0-nightly (b4d18d4bd 2023-10-31)
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
closing this in favor of #2390 which is fixed now |
Before this PR: clippy has one warning, but did not fail:
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4672812
After fix in this PR: clippy fails on warnings.
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4672949