-
-
Notifications
You must be signed in to change notification settings - Fork 783
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
Separating ComplexMethod rule into CyclomaticComplexMethod and CognitiveComplexMethod #5442
Conversation
Did you create the PR to get early reviews or to get early CI checks? Or both? In other words, even the PR is a Draft, do you want me to review it or do you want to work a bir more and make CI happy first? |
@BraisGabin Thank you for checking, I just opened it to get a review including your feedback. |
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.
Good job! Just two minor things and you need to make CI happy. I think that fixint the issues that I comment it will be happy but I'm not 100% sure because I don't fully understand why it is complaining.
* - __Nesting Level Increments__ - `if`, `when`, `for`, `while`, `do while`, `catch`, `nested function` | ||
* - __Additional Complexity Increments by Nesting Level__ - `if`, `when`, `for`, `while`, `do while`, `catch` | ||
*/ | ||
@ActiveByDefault(since = "1.22.0") |
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.
You should remove this line. And probably run ./gradlew generateDocumentation
because CI is complaining that the documentation is not on sync (probably detekt-core/src/main/resources/default-detekt-config.yml
or detekt-core/src/main/resources/deprecation.properties
)
That couls also fix the othere CI issues... I don't understand why this rule is executed...
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.
removing ActiveByDefault & sync config works fine 😄
2a0ae60
...xity/src/main/kotlin/io/gitlab/arturbosch/detekt/rules/complexity/CyclomaticComplexMethod.kt
Outdated
Show resolved
Hide resolved
…etekt/rules/complexity/CyclomaticComplexMethod.kt Co-authored-by: Brais Gabín <braisgabin@gmail.com>
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
I just added the 1.22 milestone to this one. But I would know what others think about that. We are at RC2. Should we wait until the stable version to merge it? |
I think we might have a RC3 as we received several regressions in RC3 so it's probably also fine to merge this. |
I fully agree with a |
… now caught on detekt with detekt/detekt#5442
Fixes #5349