-
Notifications
You must be signed in to change notification settings - Fork 249
Enforce clippy in CI #406
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
Enforce clippy in CI #406
Conversation
|
r? @ryankurte (rust-highfive has picked a reviewer for you, use r? to override) |
a630321 to
852f75f
Compare
852f75f to
7824d55
Compare
eldruin
left a comment
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.
I am not a fan of enforcing clippy. Using the nightly clippy is probably even more volatile.
Granted, it is pinned to a version that works fine now, but we will update it regularly and I see us making unnecessary/unrelated/even contestable changes in unrelated crates in order to land PRs.
For me, the failing ❌ icon in CI is enough warning when reviewing a PR.
| /// | ||
| /// Several operations can be combined as part of a transaction. | ||
| #[derive(Debug, PartialEq)] | ||
| #[derive(Debug, PartialEq, Eq)] |
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.
This should be noted in the changelog.
|
If we keep clippy but not enforcing it, the moment we decide to not fix a warning because we don't agree with it, all following PRs will have the red ❌ forever, due to an issue unrelated to the PR. At that point it stops being a useful flag for code review, and it's also confusing for contributors because a red ❌ in a PR usually means you did something wrong. IMO if we keep it we should enforce it, otherwise we should remove it. |
Random warnings won't appear when landing a feature PR, because the clippy version is pinned. We can update it in dedicated PRs, so the changes for any new warnings don't mix with normal PRs. |
|
Up to you @ryankurte, @therealprof |
therealprof
left a comment
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.
LGTM, thanks.
bors r+
Depends on #394
CI wasn't actually enforcing clippy, because
actions-rs/clippy-checkneeds to run aspull_request_targetto get the token to add the "fancy" comments to the diff. It does nothing when ran aspull_request.pull_request_targetis troublesome because it uses the yaml frommasterinstead of from the PR branch, which means when bumping clippy you don't know whether CI passes until after it's merged. I've made it usecargo clippyinstead, which works onpull_request.