Fork me on GitHub

Résultats PMD

Le document suivant contient les résultats de PMD 6.13.0.

Violations By Priority

Priority 1

fr/paris/lutece/plugins/plugin/modules/sample/business/IProjectDAO.java

Rule Violation Ligne
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 106

fr/paris/lutece/plugins/plugin/modules/sample/service/SampleChoiceFinder.java

Rule Violation Ligne
ClassNamingConventions The utility class name 'SampleChoiceFinder' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 620

fr/paris/lutece/plugins/plugin/modules/sample/service/SampleDateIntervals.java

Rule Violation Ligne
ClassNamingConventions The utility class name 'SampleDateIntervals' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 864

Priority 3

fr/paris/lutece/plugins/plugin/modules/sample/business/ProjectDAO.java

Rule Violation Ligne
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 230232

fr/paris/lutece/plugins/plugin/modules/sample/service/SampleChoiceFinder.java

Rule Violation Ligne
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 620
CommentRequired Header comments are required 620
CommentRequired Public method and constructor comments are required 819
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'topChoice' 18

fr/paris/lutece/plugins/plugin/modules/sample/service/SampleDateIntervals.java

Rule Violation Ligne
CommentRequired Header comments are required 864
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 864
CyclomaticComplexity The method 'intervalChoices(String)' has a cyclomatic complexity of 14. 1063
CommentRequired Public method and constructor comments are required 1063
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 16
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 17
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 17
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 18
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 18
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 19
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 19
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 20
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 20
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 21
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 21
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 22
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 22
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 23
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 41
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 55

fr/paris/lutece/plugins/plugin/modules/sample/web/AbstractManageSampleJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 50110
DefaultPackage Use explicit scoping instead of the default package private level 109
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 109

fr/paris/lutece/plugins/plugin/modules/sample/web/ProjectJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 62298
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 120
DefaultPackage Use explicit scoping instead of the default package private level 137146
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 138146
ConfusingTernary Avoid if (x != y) ..; else ..; 165

fr/paris/lutece/plugins/plugin/modules/sample/web/ProjectXPage.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 62256
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 109
ConfusingTernary Avoid if (x != y) ..; else ..; 127

Priority 4

fr/paris/lutece/plugins/plugin/modules/sample/service/SampleDateIntervals.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'java.util.HashMap' 3
UnusedImports Avoid unused imports such as 'java.util.Map' 5
UnusedImports Avoid unused imports such as 'java.util.TreeMap' 6

Fichiers

fr/paris/lutece/plugins/plugin/modules/sample/business/IProjectDAO.java

Rule Violation Priority Ligne
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 1 106

fr/paris/lutece/plugins/plugin/modules/sample/business/ProjectDAO.java

Rule Violation Priority Ligne
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 230232

fr/paris/lutece/plugins/plugin/modules/sample/service/SampleChoiceFinder.java

Rule Violation Priority Ligne
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 620
CommentRequired Header comments are required 3 620
ClassNamingConventions The utility class name 'SampleChoiceFinder' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 620
CommentRequired Public method and constructor comments are required 3 819
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'topChoice' 3 18

fr/paris/lutece/plugins/plugin/modules/sample/service/SampleDateIntervals.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'java.util.HashMap' 4 3
UnusedImports Avoid unused imports such as 'java.util.Map' 4 5
UnusedImports Avoid unused imports such as 'java.util.TreeMap' 4 6
CommentRequired Header comments are required 3 864
ClassNamingConventions The utility class name 'SampleDateIntervals' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 864
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 864
CyclomaticComplexity The method 'intervalChoices(String)' has a cyclomatic complexity of 14. 3 1063
CommentRequired Public method and constructor comments are required 3 1063
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 16
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 17
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 17
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 18
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 18
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 19
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 19
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 20
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 20
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 21
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 21
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 22
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 22
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 23
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 41
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 55

fr/paris/lutece/plugins/plugin/modules/sample/web/AbstractManageSampleJspBean.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 50110
DefaultPackage Use explicit scoping instead of the default package private level 3 109
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 109

fr/paris/lutece/plugins/plugin/modules/sample/web/ProjectJspBean.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 62298
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 120
DefaultPackage Use explicit scoping instead of the default package private level 3 137146
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 138146
ConfusingTernary Avoid if (x != y) ..; else ..; 3 165

fr/paris/lutece/plugins/plugin/modules/sample/web/ProjectXPage.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 62256
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 109
ConfusingTernary Avoid if (x != y) ..; else ..; 3 127