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. |
BraisGabin
left a comment
There was a problem hiding this comment.
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.
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.
removing ActiveByDefault & sync config works fine 😄
2a0ae60
…etekt/rules/complexity/CyclomaticComplexMethod.kt Co-authored-by: Brais Gabín <braisgabin@gmail.com>
|
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