PMD Results
The following document contains the results of PMD 7.19.0.
Violations By Priority
Priority 3
gov/nist/secauto/metaschema/maven/plugin/AbstractMetaschemaMojo.java
gov/nist/secauto/metaschema/maven/plugin/GenerateSchemaMojo.java
| Rule |
Violation |
Line |
| CognitiveComplexity |
The method 'generate(Set<IModule>)' has a cognitive complexity of 16, current threshold is 15 |
136 |
| CyclomaticComplexity |
The method 'generate(Set<IModule>)' has a cyclomatic complexity of 11. |
136 |
gov/nist/secauto/metaschema/maven/plugin/GenerateSourcesMojo.java
| Rule |
Violation |
Line |
| CyclomaticComplexity |
The method 'generate(Set<IModule>)' has a cyclomatic complexity of 10. |
83 |
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 |
83–86 |
| IdenticalCatchBranches |
'catch' branch identical to 'IOException' branch |
87–90 |
| CyclomaticComplexity |
The method 'execute()' has a cyclomatic complexity of 11. |
97 |
| NPathComplexity |
The method 'execute()' has an NPath complexity of 400, current threshold is 200 |
97 |
| UseDiamondOperator |
Explicit type arguments can be replaced by a diamond: `new ArrayList<>()` |
191 |
| 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 |
| AvoidDeeplyNestedIfStmts |
Deeply nested if..then statements are hard to read |
232–236 |
| 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 |
Priority 4
dev/metaschema/java/metaschema_maven_plugin/HelpMojo.java
Files
gov/nist/secauto/metaschema/maven/plugin/AbstractMetaschemaMojo.java
gov/nist/secauto/metaschema/maven/plugin/GenerateSchemaMojo.java
| Rule |
Violation |
Priority |
Line |
| CognitiveComplexity |
The method 'generate(Set<IModule>)' has a cognitive complexity of 16, current threshold is 15 |
3 |
136 |
| CyclomaticComplexity |
The method 'generate(Set<IModule>)' has a cyclomatic complexity of 11. |
3 |
136 |
gov/nist/secauto/metaschema/maven/plugin/GenerateSourcesMojo.java
| Rule |
Violation |
Priority |
Line |
| CyclomaticComplexity |
The method 'generate(Set<IModule>)' has a cyclomatic complexity of 10. |
3 |
83 |
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 |
83–86 |
| IdenticalCatchBranches |
'catch' branch identical to 'IOException' branch |
3 |
87–90 |
| CyclomaticComplexity |
The method 'execute()' has a cyclomatic complexity of 11. |
3 |
97 |
| NPathComplexity |
The method 'execute()' has an NPath complexity of 400, current threshold is 200 |
3 |
97 |
| UseDiamondOperator |
Explicit type arguments can be replaced by a diamond: `new ArrayList<>()` |
3 |
191 |
| 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 |
| AvoidDeeplyNestedIfStmts |
Deeply nested if..then statements are hard to read |
3 |
232–236 |
| 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 |
Suppressed Violations
| Filename |
Rule message |
Suppression type |
Reason |
| gov/nist/secauto/metaschema/maven/plugin/AbstractMetaschemaMojo.java |
Avoid catching Exception in try-catch block |
@suppresswarnings |
|
| gov/nist/secauto/metaschema/maven/plugin/GenerateSchemaMojo.java |
Field 'inlineDefinitions' may be declared final |
@suppresswarnings |
|
| gov/nist/secauto/metaschema/maven/plugin/GenerateSchemaMojo.java |
Avoid catching Exception in try-catch block |
@suppresswarnings |
|
| gov/nist/secauto/metaschema/maven/plugin/GenerateSchemaMojo.java |
Avoid catching Exception in try-catch block |
@suppresswarnings |
|