Fork me on GitHub

PMD Results

The following document contains the results of PMD 7.5.0.

Violations By Priority

Priority 3

gov/nist/secauto/metaschema/maven/plugin/AbstractMetaschemaMojo.java

Rule Violation Line
CognitiveComplexity The method 'isGenerationRequired()' has a cognitive complexity of 23, current threshold is 15 303
CyclomaticComplexity The method 'isGenerationRequired()' has a cyclomatic complexity of 10. 303

gov/nist/secauto/metaschema/maven/plugin/GenerateSchemaMojo.java

Rule Violation Line
ImmutableField Field 'inlineDefinitions' may be declared final 83
CognitiveComplexity The method 'generate(Set<IModule>)' has a cognitive complexity of 16, current threshold is 15 137
CyclomaticComplexity The method 'generate(Set<IModule>)' has a cyclomatic complexity of 11. 137
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 197
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 207
CognitiveComplexity The method 'execute()' has a cognitive complexity of 32, current threshold is 15 229
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 22. 229
NPathComplexity The method 'execute()' has an NPath complexity of 5415, current threshold is 200 229

gov/nist/secauto/metaschema/maven/plugin/GenerateSourcesMojo.java

Rule Violation Line
CognitiveComplexity The method 'execute()' has a cognitive complexity of 32, current threshold is 15 113
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 24. 113
NPathComplexity The method 'execute()' has an NPath complexity of 10830, current threshold is 200 113
ConfusingTernary Avoid if (x != y) ..; else ..; 129136

dev/metaschema/java/metaschema_maven_plugin/HelpMojo.java

Rule Violation Line
GodClass Possible God Class (WMC=79, ATFD=19, TCC=1.905%) 28
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 8386
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 8790
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 11. 97
NPathComplexity The method 'execute()' has an NPath complexity of 256, current threshold is 200 97
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new ArrayList<>()` 191
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 210
CognitiveComplexity The method 'writeGoal(StringBuilder, String, Element)' has a cognitive complexity of 15, current threshold is 15 219
CyclomaticComplexity The method 'writeGoal(StringBuilder, String, Element)' has a cyclomatic complexity of 11. 219
CyclomaticComplexity The method 'writeParameter(StringBuilder, Node, Node)' has a cyclomatic complexity of 10. 259
NPathComplexity The method 'writeParameter(StringBuilder, Node, Node)' has an NPath complexity of 216, current threshold is 200 259
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new ArrayList<>()` 348
LinguisticNaming Linguistics Antipattern - The transform method 'toLines' should not return void linguistically 370
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 443

Priority 4

dev/metaschema/java/metaschema_maven_plugin/HelpMojo.java

Rule Violation Line
UnnecessaryFullyQualifiedName Unnecessary qualifier 'java.lang': 'String' is already in scope because it is declared in java.lang 43

Files

gov/nist/secauto/metaschema/maven/plugin/AbstractMetaschemaMojo.java

Rule Violation Priority Line
CognitiveComplexity The method 'isGenerationRequired()' has a cognitive complexity of 23, current threshold is 15 3 303
CyclomaticComplexity The method 'isGenerationRequired()' has a cyclomatic complexity of 10. 3 303

gov/nist/secauto/metaschema/maven/plugin/GenerateSchemaMojo.java

Rule Violation Priority Line
ImmutableField Field 'inlineDefinitions' may be declared final 3 83
CognitiveComplexity The method 'generate(Set<IModule>)' has a cognitive complexity of 16, current threshold is 15 3 137
CyclomaticComplexity The method 'generate(Set<IModule>)' has a cyclomatic complexity of 11. 3 137
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 197
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 207
CognitiveComplexity The method 'execute()' has a cognitive complexity of 32, current threshold is 15 3 229
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 22. 3 229
NPathComplexity The method 'execute()' has an NPath complexity of 5415, current threshold is 200 3 229

gov/nist/secauto/metaschema/maven/plugin/GenerateSourcesMojo.java

Rule Violation Priority Line
CognitiveComplexity The method 'execute()' has a cognitive complexity of 32, current threshold is 15 3 113
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 24. 3 113
NPathComplexity The method 'execute()' has an NPath complexity of 10830, current threshold is 200 3 113
ConfusingTernary Avoid if (x != y) ..; else ..; 3 129136

dev/metaschema/java/metaschema_maven_plugin/HelpMojo.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=79, ATFD=19, TCC=1.905%) 3 28
UnnecessaryFullyQualifiedName Unnecessary qualifier 'java.lang': 'String' is already in scope because it is declared in java.lang 4 43
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 8386
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 8790
CyclomaticComplexity The method 'execute()' has a cyclomatic complexity of 11. 3 97
NPathComplexity The method 'execute()' has an NPath complexity of 256, current threshold is 200 3 97
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new ArrayList<>()` 3 191
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 210
CognitiveComplexity The method 'writeGoal(StringBuilder, String, Element)' has a cognitive complexity of 15, current threshold is 15 3 219
CyclomaticComplexity The method 'writeGoal(StringBuilder, String, Element)' has a cyclomatic complexity of 11. 3 219
CyclomaticComplexity The method 'writeParameter(StringBuilder, Node, Node)' has a cyclomatic complexity of 10. 3 259
NPathComplexity The method 'writeParameter(StringBuilder, Node, Node)' has an NPath complexity of 216, current threshold is 200 3 259
UseDiamondOperator Explicit type arguments can be replaced by a diamond: `new ArrayList<>()` 3 348
LinguisticNaming Linguistics Antipattern - The transform method 'toLines' should not return void linguistically 3 370
OnlyOneReturn A method should have only one exit point, and that should be the last statement in the method 3 443