This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Make clippy _a little_ more annoying #10570
Merged
paritytech-processbot
merged 15 commits into
paritytech:master
from
gilescope:giles-make-clippy-annoying-again
Jan 5, 2022
Merged
Make clippy _a little_ more annoying #10570
paritytech-processbot
merged 15 commits into
paritytech:master
from
gilescope:giles-make-clippy-annoying-again
Jan 5, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gilescope
added
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C3-medium
PR touches the given topic and has a medium impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
labels
Dec 30, 2021
gilescope
requested review from
andresilva,
athei and
kianenigma
as code owners
December 30, 2021 19:07
bkchr
suggested changes
Dec 30, 2021
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 you do this, I expect that you fix the code properly and not sprinkle around clippy annotations. For most of the stuff they are really not needed, because the code can just be changed easily.
If we do this, we either do it right or we just don't do it.
bkchr
removed
the
C3-medium
PR touches the given topic and has a medium impact on builders.
label
Dec 30, 2021
KiChjang
reviewed
Dec 30, 2021
KiChjang
reviewed
Dec 30, 2021
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
gilescope
added
the
C1-low
PR touches the given topic and has a low impact on builders.
label
Dec 31, 2021
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.
Nice. My comments are just informational, do not worry too much about them.
athei
reviewed
Jan 3, 2022
wigy-opensource-developer
approved these changes
Jan 4, 2022
The PR now includes no clippy annotations (and in fact removes one). @bkchr does the PR now address all your concerns? |
athei
approved these changes
Jan 4, 2022
bkchr
approved these changes
Jan 4, 2022
bot merge |
Merged
grishasobol
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Mar 28, 2022
* Clippy: +complexity * Update client/cli/src/arg_enums.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update bin/node/inspect/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update primitives/keystore/src/testing.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/elections/src/lib.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * Update primitives/npos-elections/fuzzer/src/reduce.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * Incorporating feedback * No need for Ok * Additional * Needed slice * Wigy's suggestions on less derefs * fix count * reverting changes brought in by option_map_unit_fn * add --all-targets Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
ark0f
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Feb 27, 2023
* Clippy: +complexity * Update client/cli/src/arg_enums.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update bin/node/inspect/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update primitives/keystore/src/testing.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update frame/elections/src/lib.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * Update primitives/npos-elections/fuzzer/src/reduce.rs Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> * Incorporating feedback * No need for Ok * Additional * Needed slice * Wigy's suggestions on less derefs * fix count * reverting changes brought in by option_map_unit_fn * add --all-targets Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
B0-silent
Changes should not be mentioned in any release notes
C1-low
PR touches the given topic and has a low impact on builders.
D3-trivial 🧸
PR contains trivial changes in a runtime directory that do not require an audit
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We've been running clippy via the CI for a few months and it all seems to be going smoothly, but Clippy is keeping a very low profile. We don't want it to be a thorn in our side but it's probably ok to dial clippy up a little.
This PR turns on the
Complexity
category lints ( https://rust-lang.github.io/rust-clippy/master/ ) except 15 which were too annoying.If you are puzzled over a code change just ask and I'll let you know the rational behind it.
There's a couple of methods where unused lifetimes have been removed - please shout out if that's not desirable for backward compatability reasons.
Let the bikeshedding of clippy complexity lints begin!