-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add Check Support for Java 21 Pattern Matching for Switch Syntax: CyclomaticComplexity #15045
Labels
Comments
31 tasks
We will add support for https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#LITERAL_WHEN as a default token, and count this token as +1 as recommended by @mahfouz72 . I am approving this issue. |
Ok, I have updated the OP, result is the same as before we had a nested EXPR token. Re-approving for same conditions from #15045 (comment) |
mahfouz72
added a commit
to mahfouz72/checkstyle
that referenced
this issue
Jul 22, 2024
…ticComplexityCheck
mahfouz72
added a commit
to mahfouz72/checkstyle
that referenced
this issue
Jul 22, 2024
…ticComplexityCheck
mahfouz72
added a commit
to mahfouz72/checkstyle
that referenced
this issue
Jul 25, 2024
…ticComplexityCheck
mahfouz72
added a commit
to mahfouz72/checkstyle
that referenced
this issue
Jul 25, 2024
…ticComplexityCheck
mahfouz72
added a commit
to mahfouz72/checkstyle
that referenced
this issue
Jul 27, 2024
…ticComplexityCheck
mahfouz72
added a commit
to mahfouz72/checkstyle
that referenced
this issue
Jul 27, 2024
…ticComplexityCheck
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
child of #14961
I have read check documentation:https://checkstyle.org/checks/metrics/cyclomaticcomplexity.html
I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
Describe what you want in detail
Since we add 1 for
&&
. I think it makes sense thatwhen
should be considered as +1 here. It is just the same as&&
in if conditions see the similarities between the two examplesThe text was updated successfully, but these errors were encountered: