Skip to content

[java] Getting ClassNotFoundException on standard PMD cyclomatic complexity plug-in #3024

Answered by oowekyala
MrAngry52 asked this question in Q&A
Discussion options

You must be logged in to vote

The ClassNotFoundException can be ignored, this rule doesn't need type information.

What happens here is simply that your code is not complex enough to trigger a violation. The rule by default reports methods that have a cyclo over 10. The first method has cyclo 6, the second 4, the main 3.

Refer to the doc of the rule, which mentions the following snippet if you want to customize the report threshold:

<rule ref="category/java/design.xml/CyclomaticComplexity">
    <properties>
        <property name="classReportLevel" value="80" />
        <property name="methodReportLevel" value="10" />
        <property name="cycloOptions" value="" />
    </properties>
</rule>

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by adangel
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2229 on January 15, 2021 08:42.