excessive_nesting: Move excessive_nesting from complexity to pedantic - #17509
excessive_nesting: Move excessive_nesting from complexity to pedantic#17509hlcfan wants to merge 3 commits into
Conversation
|
Thanks for the pull request, and welcome! You should hear from one of our reviewers after this PR gets at least 2 reviews from the community. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
- Move excessive_nesting to pedantic - Set default value 6 and update line doc comment - Add UI test ``` changelog: [`excessive_nesting`]: Move it from the `complexity` group to `pedantic` ```
f50ddf9 to
fd844a6
Compare
|
Lintcheck changes for 164a994
This comment will be updated if you push new changes |
|
but CI is failing, so please fix this.. |
|
Some changes occurred in clippy_lints/src/doc cc @notriddle |
| @@ -1,3 +1,4 @@ | |||
| #![allow(clippy::excessive_nesting)] | |||
There was a problem hiding this comment.
can you use expect for the tests? This way they will get cleaned up after refactors of the tests 😉
981ee0f to
164a994
Compare
| #![warn(clippy::pedantic)] | ||
| #![allow(clippy::let_and_return)] | ||
|
|
||
| fn main() { |
There was a problem hiding this comment.
Sorry to string you along like this. only noticed this now:
Actually, lets add a testcase for level 6 as well, so that we know that we don't lint there.
|
@rustbot concern Too many hits It looks like the proposed value of 6 will make the lint trigger in too many cases (323 hits in lintcheck). I'm not sure we can agree on a reasonable default value. |
164a994 to
bf40f22
Compare
|
Had the same concern when making the changes with default
Shall we go with |
bf40f22 to
42554ab
Compare
|
I'd say that the mere fact that you're proposing several thresholds without a good explanation for what the value should be shows that there exists no correct default value. Many people use pedantic and are satisfied with what the default values for the lint configuration are. Here I can envision some friction where people will have to create a |
|
Agreed that it breaks the developer experience for pedantic users if we roll out with a threshold. But since we move it to pedantic group, expecting it to be stricter and beneficial, setting a threshold makes sense. |
This will need to be agreed on. At this stage, I'm not convinced that this category change is a good idea. @rustbot label needs-fcp |
Fix #14923
Caution
Concerns (1 active)
Managed by
@rustbot—see help for details.