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/wiki/utils/auth/WikiAnonymousAuthentication.java

Rule Violation Ligne
ReturnEmptyArrayRatherThanNull Return an empty array rather than null. 108–111

fr/paris/lutece/plugins/wiki/web/Constants.java

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

ys/wikiparser/MarkdownCustomInputs.java

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

ys/wikiparser/Utils.java

Rule Violation Ligne
ClassNamingConventions The utility class name 'Utils' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 32–439
FieldNamingConventions The static field name 'entities' doesn't match '_[a-z][a-zA-Z0-9]*' 34
FieldNamingConventions The constant name 'translitTable' doesn't match '[A-Z][A-Z_0-9]*' 35

ys/wikiparser/WikiParser.java

Rule Violation Ligne
FieldNamingConventions The static field name 'CUSTOM_INPUTS_TO_REEMPLACE' doesn't match '_[a-z][a-zA-Z0-9]*' 69
FieldNamingConventions The field name 'wikiLength' doesn't match '_[a-z][a-zA-Z0-9]*' 70
FieldNamingConventions The field name 'wikiChars' doesn't match '_[a-z][a-zA-Z0-9]*' 71
FieldNamingConventions The field name 'sb' doesn't match '_[a-z][a-zA-Z0-9]*' 72
FieldNamingConventions The field name 'toc' doesn't match '_[a-z][a-zA-Z0-9]*' 73
FieldNamingConventions The field name 'tocLevel' doesn't match '_[a-z][a-zA-Z0-9]*' 74
FieldNamingConventions The field name 'tocAnchorIds' doesn't match '_[a-z][a-zA-Z0-9]*' 75
FieldNamingConventions The field name 'wikiText' doesn't match '_[a-z][a-zA-Z0-9]*' 76
FieldNamingConventions The field name 'pos' doesn't match '_[a-z][a-zA-Z0-9]*' 77
FieldNamingConventions The field name 'listLevel' doesn't match '_[a-z][a-zA-Z0-9]*' 78
FieldNamingConventions The field name 'listLevels' doesn't match '_[a-z][a-zA-Z0-9]*' 79
FieldNamingConventions The field name 'blockquoteBR' doesn't match '_[a-z][a-zA-Z0-9]*' 80
FieldNamingConventions The field name 'inTable' doesn't match '_[a-z][a-zA-Z0-9]*' 81
FieldNamingConventions The field name 'mediawikiTableLevel' doesn't match '_[a-z][a-zA-Z0-9]*' 82
FieldNamingConventions The field name 'HEADING_LEVEL_SHIFT' doesn't match '_[a-z][a-zA-Z0-9]*' 83
FieldNamingConventions The field name 'HEADING_ID_PREFIX' doesn't match '_[a-z][a-zA-Z0-9]*' 84
FieldNamingConventions The field name 'markdown' doesn't match '_[a-z][a-zA-Z0-9]*' 88
ConstructorCallsOverridableMethod Overridable method 'parse' called during object construction 97
LocalVariableNamingConventions The local variable name '_strTableClass' doesn't match '[a-z][a-zA-Z0-9]*' 587
ReturnEmptyArrayRatherThanNull Return an empty array rather than null. 1180–1224
FieldNamingConventions The field name 'position' doesn't match '_[a-z][a-zA-Z0-9]*' 1776

ys/wikiparser/XSSSanitizer.java

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

Priority 2

fr/paris/lutece/plugins/wiki/search/WikiSearchEngine.java

Rule Violation Ligne
AvoidReassigningParameters Avoid reassigning parameters such as 'strQuery' 82

fr/paris/lutece/plugins/wiki/service/PathService.java

Rule Violation Ligne
AvoidReassigningParameters Avoid reassigning parameters such as 'topic' 60

fr/paris/lutece/plugins/wiki/web/WikiApp.java

Rule Violation Ligne
SystemPrintln System.out.println is used 704
AvoidReassigningParameters Avoid reassigning parameters such as 'topic' 1552

ys/wikiparser/Utils.java

Rule Violation Ligne
AvoidReassigningParameters Avoid reassigning parameters such as 'text' 64
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 420

ys/wikiparser/WikiParser.java

Rule Violation Ligne
AvoidReassigningParameters Avoid reassigning parameters such as 'wikiText' 122
AvoidReassigningParameters Avoid reassigning parameters such as 'html' 610
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 1064
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 1064
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 1064
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 1064
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 1064
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 1064
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 1064
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 1146

Priority 3

fr/paris/lutece/plugins/wiki/business/ITopicVersionDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 44–152
CommentRequired Public method and constructor comments are required 78
CommentRequired Public method and constructor comments are required 80
CommentRequired Public method and constructor comments are required 101
CommentRequired Public method and constructor comments are required 114

fr/paris/lutece/plugins/wiki/business/Image.java

Rule Violation Ligne
MethodReturnsInternalArray Returning '_byValue' may expose an internal array. 99
ArrayIsStoredDirectly The user-supplied array 'value' is stored directly. 108

fr/paris/lutece/plugins/wiki/business/ImageDAO.java

Rule Violation Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 88–104

fr/paris/lutece/plugins/wiki/business/TopicDAO.java

Rule Violation Ligne
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 245
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 247
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 265
UseUnderscoresInNumericLiterals Number 60000 should separate every third digit with an underscore 276
ConfusingTernary Avoid if (x != y) ..; else ..; 281–289

fr/paris/lutece/plugins/wiki/business/TopicVersion.java

Rule Violation Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 56
ImmutableField Private field '_mapWikiContent' could be made final; it is only initialized in the declaration or constructor. 56

fr/paris/lutece/plugins/wiki/business/TopicVersionDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 45–438
LinguisticNaming Linguistics Antipattern - The setter 'setTopicVersionWithDaoUtil' should not return any type except void linguistically 392–403

fr/paris/lutece/plugins/wiki/business/TopicVersionHome.java

Rule Violation Ligne
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the removeByTopic method if you want a default access modifier 90–93
DefaultPackage Use explicit scoping instead of the default package private level 90–93

fr/paris/lutece/plugins/wiki/search/WikiIndexer.java

Rule Violation Ligne
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 195
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 255
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 256
ConfusingTernary Avoid if (x != y) ..; else ..; 266–273

fr/paris/lutece/plugins/wiki/search/WikiSearchEngine.java

Rule Violation Ligne
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 114–120
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 122

fr/paris/lutece/plugins/wiki/service/DiffService.java

Rule Violation Ligne
AvoidDuplicateLiterals The String literal "diff" appears 5 times in this file; the first occurrence is on line 100 100
AvoidDuplicateLiterals The String literal "diffreport" appears 4 times in this file; the first occurrence is on line 118 118
AvoidDuplicateLiterals The String literal "css" appears 4 times in this file; the first occurrence is on line 155 155
AvoidDuplicateLiterals The String literal "link" appears 4 times in this file; the first occurrence is on line 163 163

fr/paris/lutece/plugins/wiki/service/ImageService.java

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as 'PLUGIN_NAME'. 50

fr/paris/lutece/plugins/wiki/service/PathService.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. 49–107

fr/paris/lutece/plugins/wiki/service/RoleService.java

Rule Violation Ligne
CollapsibleIfStatements These nested if statements could be combined 104–107

fr/paris/lutece/plugins/wiki/service/WikiDiff.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 46–169

fr/paris/lutece/plugins/wiki/service/WikiExtendableResourceService.java

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as '_plugin'. 60

fr/paris/lutece/plugins/wiki/service/WikiService.java

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 52–55
ConfusingTernary Avoid if (x != y) ..; else ..; 100

fr/paris/lutece/plugins/wiki/service/WikiUtils.java

Rule Violation Ligne
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 56

fr/paris/lutece/plugins/wiki/service/parser/LuteceWikiParser.java

Rule Violation Ligne
ImmutableField Private field '_strPageName' could be made final; it is only initialized in the declaration or constructor. 66
ImmutableField Private field '_strLanguage' could be made final; it is only initialized in the declaration or constructor. 68
CommentRequired Public method and constructor comments are required 93–102
CyclomaticComplexity The method 'appendImage(String)' has a cyclomatic complexity of 12. 182–249
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 187
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 188
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 189
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 190
MissingBreakInSwitch A switch statement does not contain a break 202–214
SwitchStmtsShouldHaveDefault Switch statements should have a default label 202–214
AvoidDuplicateLiterals The String literal "\" " appears 6 times in this file; the first occurrence is on line 217 217
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 219
CyclomaticComplexity The method 'appendLink(String)' has a cyclomatic complexity of 13. 255–314
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 257
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 258
InefficientEmptyStringCheck String.trim().length() == 0 / String.trim().isEmpty() is an inefficient way to validate a blank String. 302

fr/paris/lutece/plugins/wiki/service/parser/WikiMacroService.java

Rule Violation Ligne
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 109

fr/paris/lutece/plugins/wiki/utils/auth/WikiAnonymousAuthentication.java

Rule Violation Ligne
UncommentedEmptyMethodBody Document empty method body 83–84
UncommentedEmptyMethodBody Document empty method body 309–310

fr/paris/lutece/plugins/wiki/utils/auth/WikiAnonymousUser.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 45–84

fr/paris/lutece/plugins/wiki/web/WikiApp.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–1786
GodClass Possible God Class (WMC=57, ATFD=53, TCC=5.807%) 116–1786
ExcessiveClassLength Avoid really long classes. 116–1786
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 116–1786
TooManyMethods This class has too many methods, consider refactoring it. 117–1786
UnusedPrivateField Avoid unused private fields such as 'MARK_TOPIC_NAME'. 142
UnusedPrivateField Avoid unused private fields such as 'MARK_TOPIC_CONTENT_HTML'. 143
UnusedPrivateField Avoid unused private fields such as 'ACTION_CHANGE_LANGUAGE'. 187
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 220
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 234
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 256
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 289
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 289
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 290
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 290
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 312
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 366
EmptyCatchBlock Avoid empty catch blocks 382
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 437
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 438
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 461
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 512
UnusedLocalVariable Avoid unused local variables such as 'strLocale'. 528
ConfusingTernary Avoid if (x != y) ..; else ..; 534
NPathComplexity The method 'getModifyTopic(HttpServletRequest)' has an NPath complexity of 504 576–672
NcssCount The method 'getModifyTopic(HttpServletRequest)' has a NCSS line count of 62. 576–672
CyclomaticComplexity The method 'getModifyTopic(HttpServletRequest)' has a cyclomatic complexity of 14. 576–672
ConfusingTernary Avoid if (x != y) ..; else ..; 607–614
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 635
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 642
NPathComplexity The method 'doModifyTopic(HttpServletRequest)' has an NPath complexity of 1152 686–778
CyclomaticComplexity The method 'doModifyTopic(HttpServletRequest)' has a cyclomatic complexity of 15. 686–778
NcssCount The method 'doModifyTopic(HttpServletRequest)' has a NCSS line count of 69. 686–778
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 688
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 692
ConfusingTernary Avoid if (x != y) ..; else ..; 692
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 693
ConfusingTernary Avoid if (x != y) ..; else ..; 693
ConfusingTernary Avoid if (x != y) ..; else ..; 694
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 694
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 695
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 696
ConfusingTernary Avoid if (x != y) ..; else ..; 698
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 698
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 705
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 708
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 709
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 792
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 793
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 794
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 795
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 797
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 798
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 799
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 800
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 801
CyclomaticComplexity The method 'doUploadImage(HttpServletRequest)' has a cyclomatic complexity of 12. 976–1028
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 980
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 981
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 983
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 991
ConfusingTernary Avoid if (x != y) ..; else ..; 1008–1016
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1143
ConfusingTernary Avoid if (x != y) ..; else ..; 1144
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 1270
CommentRequired Public method and constructor comments are required 1282–1322
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1289
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 1303
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 1314
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 1316
ConfusingTernary Avoid if (x != y) ..; else ..; 1431–1441
CyclomaticComplexity The method 'getPageExtendedPath(Topic, HttpServletRequest)' has a cyclomatic complexity of 11. 1552–1602
CollapsibleIfStatements These nested if statements could be combined 1580–1584
ConfusingTernary Avoid if (x != y) ..; else ..; 1652–1660
ConfusingTernary Avoid if (x != y) ..; else ..; 1716–1727

ys/wikiparser/MarkdownCustomInputs.java

Rule Violation Ligne
ImportFromSamePackage No need to import a type that lives in the same package 6
CommentRequired Header comments are required 13–97
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. 14–97
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 30
StringToString Avoid calling toString() on String objects; this is unnecessary. 51
StringToString Avoid calling toString() on String objects; this is unnecessary. 51
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'sanitizedHtml' 68
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 88

ys/wikiparser/Utils.java

Rule Violation Ligne
CommentRequired Header comments are required 32–439
TooManyMethods This class has too many methods, consider refactoring it. 33–439
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. 33–439
RedundantFieldInitializer Avoid using redundant field initializer for 'entities' 34
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 34
CommentRequired Public method and constructor comments are required 37–50
ShortVariable Avoid variables with short names like c 37
CommentRequired Public method and constructor comments are required 52–55
ShortVariable Avoid variables with short names like c 52
ShortVariable Avoid variables with short names like sb 77
ShortVariable Avoid variables with short names like c 83
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 85
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'p' 90
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 98
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 107
CommentRequired Public method and constructor comments are required 127–172
ShortVariable Avoid variables with short names like s 127
ShortVariable Avoid variables with short names like sb 134
ShortVariable Avoid variables with short names like ch 139
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 141
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 146
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 151
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 156
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 161
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 174
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 174–201
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 178
CommentRequired Public method and constructor comments are required 203–268
CyclomaticComplexity The method 'unescapeHTML(String)' has a cyclomatic complexity of 11. 203–268
ShortVariable Avoid variables with short names like sb 216
ShortVariable Avoid variables with short names like c 221
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 223
ShortVariable Avoid variables with short names like ce 225
ShortVariable Avoid variables with short names like i1 226
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 230
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 232
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'i' 254
ShortVariable Avoid variables with short names like s 270
CommentRequired Public method and constructor comments are required 270–280
AvoidCatchingThrowable A catch statement should never catch throwable since it includes errors. 276
CommentRequired Public method and constructor comments are required 282–292
ShortVariable Avoid variables with short names like s 282
AvoidCatchingThrowable A catch statement should never catch throwable since it includes errors. 288
CommentRequired Public method and constructor comments are required 294–311
ShortVariable Avoid variables with short names like to 294
ShortVariable Avoid variables with short names like i1 298
ShortVariable Avoid variables with short names like i2 299
AssignmentInOperand Avoid assignments in operands 301
ShortVariable Avoid variables with short names like s 313
CommentRequired Public method and constructor comments are required 313–336
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 321
AssignmentInOperand Avoid assignments in operands 325
ShortVariable Avoid variables with short names like a 333
ShortVariable Avoid variables with short names like s 346
CyclomaticComplexity The method 'translit(String)' has a cyclomatic complexity of 17. 346–389
ShortVariable Avoid variables with short names like sb 353
ShortVariable Avoid variables with short names like ch 359
ShortVariable Avoid variables with short names like c 365
CommentRequired Public method and constructor comments are required 391–394
ShortVariable Avoid variables with short names like s 391
ShortVariable Avoid variables with short names like s 396
CommentRequired Public method and constructor comments are required 396–399
CommentRequired Public method and constructor comments are required 401–404
ShortVariable Avoid variables with short names like s 401
CommentRequired Public method and constructor comments are required 406–409
ShortVariable Avoid variables with short names like s 406

ys/wikiparser/WikiParser.java

Rule Violation Ligne
ExcessiveClassLength Avoid really long classes. 46–1799
TooManyFields Too many fields 46–1799
CyclomaticComplexity The class 'WikiParser' has a total cyclomatic complexity of 297 (highest 112). 46–1799
TooManyMethods This class has too many methods, consider refactoring it. 47–1799
AvoidDuplicateLiterals The String literal "}}}" appears 4 times in this file; the first occurrence is on line 50 50
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 26 characters appended. 72
AvoidStringBufferField StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time). 72
ShortVariable Avoid variables with short names like sb 72
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 46 characters appended. 73
AvoidStringBufferField StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time). 73
RedundantFieldInitializer Avoid using redundant field initializer for 'tocLevel' 74
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 75
ImmutableField Private field 'tocAnchorIds' could be made final; it is only initialized in the declaration or constructor. 75
LooseCoupling Avoid using implementation types like 'HashSet'; use the interface instead 75
RedundantFieldInitializer Avoid using redundant field initializer for 'pos' 77
RedundantFieldInitializer Avoid using redundant field initializer for 'blockquoteBR' 80
RedundantFieldInitializer Avoid using redundant field initializer for 'inTable' 81
RedundantFieldInitializer Avoid using redundant field initializer for 'mediawikiTableLevel' 82
RedundantFieldInitializer Avoid using redundant field initializer for 'HEADING_ID_PREFIX' 84
CommentRequired Protected method constructor comments are required 89–93
CommentRequired Protected method constructor comments are required 95–98
CommentRequired Protected method constructor comments are required 100–103
CommentRequired Protected method constructor comments are required 106–109
CommentRequired Protected method constructor comments are required 112–115
CommentRequired Public method and constructor comments are required 117–120
CommentRequired Protected method constructor comments are required 122–140
ControlStatementBraces This statement should have braces 131–132
EmptyWhileStmt Avoid empty while statements 132
ControlStatementBraces This statement should have braces 136–137
AssignmentInOperand Avoid assignments in operands 136
CommentRequired Protected method constructor comments are required 141–604
ExcessiveMethodLength Avoid really long methods. 141–604
ShortVariable Avoid variables with short names like c 638
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 642
MissingOverride The method 'toString()' is missing an @Override annotation. 668–671
CommentRequired Public method and constructor comments are required 668–671
ExcessiveMethodLength Avoid really long methods. 688–990
NPathComplexity The method 'parseBlock()' has an NPath complexity of 6386688 688–990
NcssCount The method 'parseBlock()' has a NCSS line count of 146. 688–990
CyclomaticComplexity The method 'parseBlock()' has a cyclomatic complexity of 81. 688–990
ControlStatementBraces This statement should have braces 690–691
ShortVariable Avoid variables with short names like c 698
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 700
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 708
ShortVariable Avoid variables with short names like pp 713
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 720
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 726
ControlStatementBraces This statement should have braces 732–733
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 755
ShortVariable Avoid variables with short names like lc 775
ControlStatementBraces This statement should have braces 778–779
ShortVariable Avoid variables with short names like cc 802
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 823
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 839
ShortVariable Avoid variables with short names like hc 842
ControlStatementBraces This statement should have braces 845–846
ShortVariable Avoid variables with short names like p 853
ControlStatementBraces This statement should have braces 855–856
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 874
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 886
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 891
ShortVariable Avoid variables with short names like pp 910
ControlStatementBraces This statement should have braces 912–913
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 917
ShortVariable Avoid variables with short names like p 928
ControlStatementBraces This statement should have braces 930–931
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 942
CollapsibleIfStatements These nested if statements could be combined 945–982
ShortVariable Avoid variables with short names like nc 947
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 969
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 974
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 985
ControlStatementBraces This statement should have braces 1013–1014
CyclomaticComplexity The method 'parseTableRow(int)' has a cyclomatic complexity of 18. 1064–1139
NPathComplexity The method 'parseTableRow(int)' has an NPath complexity of 5762 1064–1139
ControlStatementBraces This statement should have braces 1079–1080
ShortVariable Avoid variables with short names like th 1085
ControlStatementBraces This statement should have braces 1088–1089
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1100
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1120
ControlStatementBraces This statement should have braces 1148–1149
NPathComplexity The method 'checkURI(int, int, int)' has an NPath complexity of 290 1180–1224
ShortVariable Avoid variables with short names like p 1180
CyclomaticComplexity The method 'checkURI(int, int, int)' has a cyclomatic complexity of 15. 1180–1224
ShortVariable Avoid variables with short names like pb 1185
ControlStatementBraces This statement should have braces 1187–1188
ShortVariable Avoid variables with short names like pe 1190
ControlStatementBraces This statement should have braces 1192–1193
ControlStatementBraces This statement should have braces 1199–1200
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'e' 1234
NcssCount The method 'parseItemThrow(int, String, ContextType)' has a NCSS line count of 185. 1238–1636
ExcessiveMethodLength Avoid really long methods. 1238–1636
CyclomaticComplexity The method 'parseItemThrow(int, String, ContextType)' has a cyclomatic complexity of 112. 1238–1636
NPathComplexity The method 'parseItemThrow(int, String, ContextType)' has an NPath complexity of 18711842 1238–1636
ShortVariable Avoid variables with short names like tb 1240
ShortVariable Avoid variables with short names like p 1243
CollapsibleIfStatements These nested if statements could be combined 1257–1262
ShortVariable Avoid variables with short names like c 1265
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1269
ControlStatementBraces This statement should have braces 1283–1284
ShortVariable Avoid variables with short names like pp 1297
ControlStatementBraces This statement should have braces 1299–1300
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1332
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1337
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1342
CollapsibleIfStatements These nested if statements could be combined 1345–1356
ShortVariable Avoid variables with short names like pp 1347
ControlStatementBraces This statement should have braces 1349–1350
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1365
CollapsibleIfStatements These nested if statements could be combined 1367–1371
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1376
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1392
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1397
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1443
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1462
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1475
CollapsibleIfStatements These nested if statements could be combined 1479–1493
AssignmentInOperand Avoid assignments in operands 1497
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1504
ShortVariable Avoid variables with short names like pb 1511
ShortVariable Avoid variables with short names like pe 1512
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1546
CollapsibleIfStatements These nested if statements could be combined 1553–1597
ShortVariable Avoid variables with short names like nc 1555
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1581
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1586
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 1612
CollapsibleIfStatements These nested if statements could be combined 1615–1624
CommentRequired Protected method constructor comments are required 1638–1650
CommentRequired Protected method constructor comments are required 1652–1677
EmptyCatchBlock Avoid empty catch blocks 1661–1663
CommentRequired Protected method constructor comments are required 1679–1703
EmptyCatchBlock Avoid empty catch blocks 1688–1690
CommentRequired Protected method constructor comments are required 1705–1708
CommentRequired Protected method constructor comments are required 1710–1725
ShortVariable Avoid variables with short names like i 1712
ShortVariable Avoid variables with short names like id 1713
ConfusingTernary Avoid if (x != y) ..; else ..; 1713
CommentRequired Protected method constructor comments are required 1727–1749
CommentRequired Protected method constructor comments are required 1751–1766
AssignmentInOperand Avoid assignments in operands 1762
CommentRequired Protected method constructor comments are required 1768–1771
CommentRequired Header comments are required 1773–1783
DefaultPackage Use explicit scoping instead of the default package private level 1776
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the position field if you want a default access modifier 1776
CommentRequired Public method and constructor comments are required 1778–1782
CommentRequired Header comments are required 1785–1793
CommentRequired Public method and constructor comments are required 1789–1792
UnnecessaryModifier Unnecessary modifier 'static' on enum 'ContextType': nested enums are implicitly static 1795–1798
CommentRequired Enum comments are required 1795–1798

ys/wikiparser/XSSSanitizer.java

Rule Violation Ligne
CommentRequired Header comments are required 6–26
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. 6–26
CommentRequired Public method and constructor comments are required 16–24

Priority 4

fr/paris/lutece/plugins/wiki/business/ITopicVersionDAO.java

Rule Violation Ligne
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'fr.paris.lutece.portal.service.plugin.Plugin' due to existing import 'fr.paris.lutece.portal.service.plugin.Plugin' 142

fr/paris/lutece/plugins/wiki/service/WikiDiff.java

Rule Violation Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 81–84

fr/paris/lutece/plugins/wiki/service/WikiService.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'java.util.Locale' 39

fr/paris/lutece/plugins/wiki/web/WikiApp.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.business.role.RoleHome' 54
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.template.AppTemplateService' 72
UnusedImports Avoid unused imports such as 'fr.paris.lutece.util.html.HtmlTemplate' 86
UnusedImports Avoid unused imports such as 'java.util.function.Predicate' 98
UnusedImports Avoid unused imports such as 'javax.servlet.http.HttpSession' 100
UnusedImports Avoid unused imports such as 'org.bouncycastle.i18n.LocaleString' 105
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'fr.paris.lutece.portal.service.message.SiteMessageException' due to existing import 'fr.paris.lutece.portal.service.message.SiteMessageException' 501

Fichiers

fr/paris/lutece/plugins/wiki/business/ITopicVersionDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 44–152
CommentRequired Public method and constructor comments are required 3 78
CommentRequired Public method and constructor comments are required 3 80
CommentRequired Public method and constructor comments are required 3 101
CommentRequired Public method and constructor comments are required 3 114
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'fr.paris.lutece.portal.service.plugin.Plugin' due to existing import 'fr.paris.lutece.portal.service.plugin.Plugin' 4 142

fr/paris/lutece/plugins/wiki/business/Image.java

Rule Violation Priority Ligne
MethodReturnsInternalArray Returning '_byValue' may expose an internal array. 3 99
ArrayIsStoredDirectly The user-supplied array 'value' is stored directly. 3 108

fr/paris/lutece/plugins/wiki/business/ImageDAO.java

Rule Violation Priority Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 88–104

fr/paris/lutece/plugins/wiki/business/TopicDAO.java

Rule Violation Priority Ligne
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 245
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 3 247
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 265
UseUnderscoresInNumericLiterals Number 60000 should separate every third digit with an underscore 3 276
ConfusingTernary Avoid if (x != y) ..; else ..; 3 281–289

fr/paris/lutece/plugins/wiki/business/TopicVersion.java

Rule Violation Priority Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 56
ImmutableField Private field '_mapWikiContent' could be made final; it is only initialized in the declaration or constructor. 3 56

fr/paris/lutece/plugins/wiki/business/TopicVersionDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 45–438
LinguisticNaming Linguistics Antipattern - The setter 'setTopicVersionWithDaoUtil' should not return any type except void linguistically 3 392–403

fr/paris/lutece/plugins/wiki/business/TopicVersionHome.java

Rule Violation Priority Ligne
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the removeByTopic method if you want a default access modifier 3 90–93
DefaultPackage Use explicit scoping instead of the default package private level 3 90–93

fr/paris/lutece/plugins/wiki/search/WikiIndexer.java

Rule Violation Priority Ligne
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 195
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 255
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 256
ConfusingTernary Avoid if (x != y) ..; else ..; 3 266–273

fr/paris/lutece/plugins/wiki/search/WikiSearchEngine.java

Rule Violation Priority Ligne
AvoidReassigningParameters Avoid reassigning parameters such as 'strQuery' 2 82
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 114–120
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 122

fr/paris/lutece/plugins/wiki/service/DiffService.java

Rule Violation Priority Ligne
AvoidDuplicateLiterals The String literal "diff" appears 5 times in this file; the first occurrence is on line 100 3 100
AvoidDuplicateLiterals The String literal "diffreport" appears 4 times in this file; the first occurrence is on line 118 3 118
AvoidDuplicateLiterals The String literal "css" appears 4 times in this file; the first occurrence is on line 155 3 155
AvoidDuplicateLiterals The String literal "link" appears 4 times in this file; the first occurrence is on line 163 3 163

fr/paris/lutece/plugins/wiki/service/ImageService.java

Rule Violation Priority Ligne
UnusedPrivateField Avoid unused private fields such as 'PLUGIN_NAME'. 3 50

fr/paris/lutece/plugins/wiki/service/PathService.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 49–107
AvoidReassigningParameters Avoid reassigning parameters such as 'topic' 2 60

fr/paris/lutece/plugins/wiki/service/RoleService.java

Rule Violation Priority Ligne
CollapsibleIfStatements These nested if statements could be combined 3 104–107

fr/paris/lutece/plugins/wiki/service/WikiDiff.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 46–169
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 81–84

fr/paris/lutece/plugins/wiki/service/WikiExtendableResourceService.java

Rule Violation Priority Ligne
UnusedPrivateField Avoid unused private fields such as '_plugin'. 3 60

fr/paris/lutece/plugins/wiki/service/WikiService.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'java.util.Locale' 4 39
CallSuperInConstructor It is a good practice to call super() in a constructor 3 52–55
ConfusingTernary Avoid if (x != y) ..; else ..; 3 100

fr/paris/lutece/plugins/wiki/service/WikiUtils.java

Rule Violation Priority Ligne
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 56

fr/paris/lutece/plugins/wiki/service/parser/LuteceWikiParser.java

Rule Violation Priority Ligne
ImmutableField Private field '_strPageName' could be made final; it is only initialized in the declaration or constructor. 3 66
ImmutableField Private field '_strLanguage' could be made final; it is only initialized in the declaration or constructor. 3 68
CommentRequired Public method and constructor comments are required 3 93–102
CyclomaticComplexity The method 'appendImage(String)' has a cyclomatic complexity of 12. 3 182–249
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 187
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 188
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 189
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 190
MissingBreakInSwitch A switch statement does not contain a break 3 202–214
SwitchStmtsShouldHaveDefault Switch statements should have a default label 3 202–214
AvoidDuplicateLiterals The String literal "\" " appears 6 times in this file; the first occurrence is on line 217 3 217
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 219
CyclomaticComplexity The method 'appendLink(String)' has a cyclomatic complexity of 13. 3 255–314
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 257
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 258
InefficientEmptyStringCheck String.trim().length() == 0 / String.trim().isEmpty() is an inefficient way to validate a blank String. 3 302

fr/paris/lutece/plugins/wiki/service/parser/WikiMacroService.java

Rule Violation Priority Ligne
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 109

fr/paris/lutece/plugins/wiki/utils/auth/WikiAnonymousAuthentication.java

Rule Violation Priority Ligne
UncommentedEmptyMethodBody Document empty method body 3 83–84
ReturnEmptyArrayRatherThanNull Return an empty array rather than null. 1 108–111
UncommentedEmptyMethodBody Document empty method body 3 309–310

fr/paris/lutece/plugins/wiki/utils/auth/WikiAnonymousUser.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 45–84

fr/paris/lutece/plugins/wiki/web/Constants.java

Rule Violation Priority Ligne
ClassNamingConventions The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 39–80

fr/paris/lutece/plugins/wiki/web/WikiApp.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–1786
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.business.role.RoleHome' 4 54
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.template.AppTemplateService' 4 72
UnusedImports Avoid unused imports such as 'fr.paris.lutece.util.html.HtmlTemplate' 4 86
UnusedImports Avoid unused imports such as 'java.util.function.Predicate' 4 98
UnusedImports Avoid unused imports such as 'javax.servlet.http.HttpSession' 4 100
UnusedImports Avoid unused imports such as 'org.bouncycastle.i18n.LocaleString' 4 105
GodClass Possible God Class (WMC=57, ATFD=53, TCC=5.807%) 3 116–1786
ExcessiveClassLength Avoid really long classes. 3 116–1786
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 116–1786
TooManyMethods This class has too many methods, consider refactoring it. 3 117–1786
UnusedPrivateField Avoid unused private fields such as 'MARK_TOPIC_NAME'. 3 142
UnusedPrivateField Avoid unused private fields such as 'MARK_TOPIC_CONTENT_HTML'. 3 143
UnusedPrivateField Avoid unused private fields such as 'ACTION_CHANGE_LANGUAGE'. 3 187
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 220
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 234
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 256
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 289
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 289
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 290
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 290
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 312
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 366
EmptyCatchBlock Avoid empty catch blocks 3 382
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 437
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 438
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 461
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'fr.paris.lutece.portal.service.message.SiteMessageException' due to existing import 'fr.paris.lutece.portal.service.message.SiteMessageException' 4 501
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 512
UnusedLocalVariable Avoid unused local variables such as 'strLocale'. 3 528
ConfusingTernary Avoid if (x != y) ..; else ..; 3 534
NPathComplexity The method 'getModifyTopic(HttpServletRequest)' has an NPath complexity of 504 3 576–672
NcssCount The method 'getModifyTopic(HttpServletRequest)' has a NCSS line count of 62. 3 576–672
CyclomaticComplexity The method 'getModifyTopic(HttpServletRequest)' has a cyclomatic complexity of 14. 3 576–672
ConfusingTernary Avoid if (x != y) ..; else ..; 3 607–614
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 635
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 642
NPathComplexity The method 'doModifyTopic(HttpServletRequest)' has an NPath complexity of 1152 3 686–778
CyclomaticComplexity The method 'doModifyTopic(HttpServletRequest)' has a cyclomatic complexity of 15. 3 686–778
NcssCount The method 'doModifyTopic(HttpServletRequest)' has a NCSS line count of 69. 3 686–778
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 688
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 692
ConfusingTernary Avoid if (x != y) ..; else ..; 3 692
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 693
ConfusingTernary Avoid if (x != y) ..; else ..; 3 693
ConfusingTernary Avoid if (x != y) ..; else ..; 3 694
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 694
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 695
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 696
ConfusingTernary Avoid if (x != y) ..; else ..; 3 698
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 698
SystemPrintln System.out.println is used 2 704
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 705
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 708
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 709
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 792
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 793
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 794
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 795
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 797
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 798
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 799
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 800
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 801
CyclomaticComplexity The method 'doUploadImage(HttpServletRequest)' has a cyclomatic complexity of 12. 3 976–1028
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 980
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 981
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 983
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 991
ConfusingTernary Avoid if (x != y) ..; else ..; 3 1008–1016
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1143
ConfusingTernary Avoid if (x != y) ..; else ..; 3 1144
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 1270
CommentRequired Public method and constructor comments are required 3 1282–1322
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1289
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 1303
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 1314
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 1316
ConfusingTernary Avoid if (x != y) ..; else ..; 3 1431–1441
AvoidReassigningParameters Avoid reassigning parameters such as 'topic' 2 1552
CyclomaticComplexity The method 'getPageExtendedPath(Topic, HttpServletRequest)' has a cyclomatic complexity of 11. 3 1552–1602
CollapsibleIfStatements These nested if statements could be combined 3 1580–1584
ConfusingTernary Avoid if (x != y) ..; else ..; 3 1652–1660
ConfusingTernary Avoid if (x != y) ..; else ..; 3 1716–1727

ys/wikiparser/MarkdownCustomInputs.java

Rule Violation Priority Ligne
ImportFromSamePackage No need to import a type that lives in the same package 3 6
ClassNamingConventions The utility class name 'MarkdownCustomInputs' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 13–97
CommentRequired Header comments are required 3 13–97
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 14–97
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 30
StringToString Avoid calling toString() on String objects; this is unnecessary. 3 51
StringToString Avoid calling toString() on String objects; this is unnecessary. 3 51
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'sanitizedHtml' 3 68
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 88

ys/wikiparser/Utils.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 32–439
ClassNamingConventions The utility class name 'Utils' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 32–439
TooManyMethods This class has too many methods, consider refactoring it. 3 33–439
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 33–439
RedundantFieldInitializer Avoid using redundant field initializer for 'entities' 3 34
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 3 34
FieldNamingConventions The static field name 'entities' doesn't match '_[a-z][a-zA-Z0-9]*' 1 34
FieldNamingConventions The constant name 'translitTable' doesn't match '[A-Z][A-Z_0-9]*' 1 35
CommentRequired Public method and constructor comments are required 3 37–50
ShortVariable Avoid variables with short names like c 3 37
CommentRequired Public method and constructor comments are required 3 52–55
ShortVariable Avoid variables with short names like c 3 52
AvoidReassigningParameters Avoid reassigning parameters such as 'text' 2 64
ShortVariable Avoid variables with short names like sb 3 77
ShortVariable Avoid variables with short names like c 3 83
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 85
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'p' 3 90
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 98
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 107
CommentRequired Public method and constructor comments are required 3 127–172
ShortVariable Avoid variables with short names like s 3 127
ShortVariable Avoid variables with short names like sb 3 134
ShortVariable Avoid variables with short names like ch 3 139
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 141
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 146
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 151
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 156
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 161
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 3 174
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 174–201
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 178
CommentRequired Public method and constructor comments are required 3 203–268
CyclomaticComplexity The method 'unescapeHTML(String)' has a cyclomatic complexity of 11. 3 203–268
ShortVariable Avoid variables with short names like sb 3 216
ShortVariable Avoid variables with short names like c 3 221
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 223
ShortVariable Avoid variables with short names like ce 3 225
ShortVariable Avoid variables with short names like i1 3 226
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 230
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 232
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'i' 3 254
ShortVariable Avoid variables with short names like s 3 270
CommentRequired Public method and constructor comments are required 3 270–280
AvoidCatchingThrowable A catch statement should never catch throwable since it includes errors. 3 276
CommentRequired Public method and constructor comments are required 3 282–292
ShortVariable Avoid variables with short names like s 3 282
AvoidCatchingThrowable A catch statement should never catch throwable since it includes errors. 3 288
CommentRequired Public method and constructor comments are required 3 294–311
ShortVariable Avoid variables with short names like to 3 294
ShortVariable Avoid variables with short names like i1 3 298
ShortVariable Avoid variables with short names like i2 3 299
AssignmentInOperand Avoid assignments in operands 3 301
ShortVariable Avoid variables with short names like s 3 313
CommentRequired Public method and constructor comments are required 3 313–336
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 321
AssignmentInOperand Avoid assignments in operands 3 325
ShortVariable Avoid variables with short names like a 3 333
ShortVariable Avoid variables with short names like s 3 346
CyclomaticComplexity The method 'translit(String)' has a cyclomatic complexity of 17. 3 346–389
ShortVariable Avoid variables with short names like sb 3 353
ShortVariable Avoid variables with short names like ch 3 359
ShortVariable Avoid variables with short names like c 3 365
CommentRequired Public method and constructor comments are required 3 391–394
ShortVariable Avoid variables with short names like s 3 391
ShortVariable Avoid variables with short names like s 3 396
CommentRequired Public method and constructor comments are required 3 396–399
CommentRequired Public method and constructor comments are required 3 401–404
ShortVariable Avoid variables with short names like s 3 401
CommentRequired Public method and constructor comments are required 3 406–409
ShortVariable Avoid variables with short names like s 3 406
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 2 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 2 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 2 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 2 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 2 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 2 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 2 420
AvoidReassigningParameters Avoid reassigning parameters such as 'content' 2 420

ys/wikiparser/WikiParser.java

Rule Violation Priority Ligne
ExcessiveClassLength Avoid really long classes. 3 46–1799
TooManyFields Too many fields 3 46–1799
CyclomaticComplexity The class 'WikiParser' has a total cyclomatic complexity of 297 (highest 112). 3 46–1799
TooManyMethods This class has too many methods, consider refactoring it. 3 47–1799
AvoidDuplicateLiterals The String literal "}}}" appears 4 times in this file; the first occurrence is on line 50 3 50
FieldNamingConventions The static field name 'CUSTOM_INPUTS_TO_REEMPLACE' doesn't match '_[a-z][a-zA-Z0-9]*' 1 69
FieldNamingConventions The field name 'wikiLength' doesn't match '_[a-z][a-zA-Z0-9]*' 1 70
FieldNamingConventions The field name 'wikiChars' doesn't match '_[a-z][a-zA-Z0-9]*' 1 71
FieldNamingConventions The field name 'sb' doesn't match '_[a-z][a-zA-Z0-9]*' 1 72
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 26 characters appended. 3 72
AvoidStringBufferField StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time). 3 72
ShortVariable Avoid variables with short names like sb 3 72
FieldNamingConventions The field name 'toc' doesn't match '_[a-z][a-zA-Z0-9]*' 1 73
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 46 characters appended. 3 73
AvoidStringBufferField StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time). 3 73
FieldNamingConventions The field name 'tocLevel' doesn't match '_[a-z][a-zA-Z0-9]*' 1 74
RedundantFieldInitializer Avoid using redundant field initializer for 'tocLevel' 3 74
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 75
FieldNamingConventions The field name 'tocAnchorIds' doesn't match '_[a-z][a-zA-Z0-9]*' 1 75
ImmutableField Private field 'tocAnchorIds' could be made final; it is only initialized in the declaration or constructor. 3 75
LooseCoupling Avoid using implementation types like 'HashSet'; use the interface instead 3 75
FieldNamingConventions The field name 'wikiText' doesn't match '_[a-z][a-zA-Z0-9]*' 1 76
FieldNamingConventions The field name 'pos' doesn't match '_[a-z][a-zA-Z0-9]*' 1 77
RedundantFieldInitializer Avoid using redundant field initializer for 'pos' 3 77
FieldNamingConventions The field name 'listLevel' doesn't match '_[a-z][a-zA-Z0-9]*' 1 78
FieldNamingConventions The field name 'listLevels' doesn't match '_[a-z][a-zA-Z0-9]*' 1 79
FieldNamingConventions The field name 'blockquoteBR' doesn't match '_[a-z][a-zA-Z0-9]*' 1 80
RedundantFieldInitializer Avoid using redundant field initializer for 'blockquoteBR' 3 80
FieldNamingConventions The field name 'inTable' doesn't match '_[a-z][a-zA-Z0-9]*' 1 81
RedundantFieldInitializer Avoid using redundant field initializer for 'inTable' 3 81
RedundantFieldInitializer Avoid using redundant field initializer for 'mediawikiTableLevel' 3 82
FieldNamingConventions The field name 'mediawikiTableLevel' doesn't match '_[a-z][a-zA-Z0-9]*' 1 82
FieldNamingConventions The field name 'HEADING_LEVEL_SHIFT' doesn't match '_[a-z][a-zA-Z0-9]*' 1 83
FieldNamingConventions The field name 'HEADING_ID_PREFIX' doesn't match '_[a-z][a-zA-Z0-9]*' 1 84
RedundantFieldInitializer Avoid using redundant field initializer for 'HEADING_ID_PREFIX' 3 84
FieldNamingConventions The field name 'markdown' doesn't match '_[a-z][a-zA-Z0-9]*' 1 88
CommentRequired Protected method constructor comments are required 3 89–93
CommentRequired Protected method constructor comments are required 3 95–98
ConstructorCallsOverridableMethod Overridable method 'parse' called during object construction 1 97
CommentRequired Protected method constructor comments are required 3 100–103
CommentRequired Protected method constructor comments are required 3 106–109
CommentRequired Protected method constructor comments are required 3 112–115
CommentRequired Public method and constructor comments are required 3 117–120
CommentRequired Protected method constructor comments are required 3 122–140
AvoidReassigningParameters Avoid reassigning parameters such as 'wikiText' 2 122
ControlStatementBraces This statement should have braces 3 131–132
EmptyWhileStmt Avoid empty while statements 3 132
ControlStatementBraces This statement should have braces 3 136–137
AssignmentInOperand Avoid assignments in operands 3 136
CommentRequired Protected method constructor comments are required 3 141–604
ExcessiveMethodLength Avoid really long methods. 3 141–604
LocalVariableNamingConventions The local variable name '_strTableClass' doesn't match '[a-z][a-zA-Z0-9]*' 1 587
AvoidReassigningParameters Avoid reassigning parameters such as 'html' 2 610
ShortVariable Avoid variables with short names like c 3 638
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 642
MissingOverride The method 'toString()' is missing an @Override annotation. 3 668–671
CommentRequired Public method and constructor comments are required 3 668–671
ExcessiveMethodLength Avoid really long methods. 3 688–990
NPathComplexity The method 'parseBlock()' has an NPath complexity of 6386688 3 688–990
NcssCount The method 'parseBlock()' has a NCSS line count of 146. 3 688–990
CyclomaticComplexity The method 'parseBlock()' has a cyclomatic complexity of 81. 3 688–990
ControlStatementBraces This statement should have braces 3 690–691
ShortVariable Avoid variables with short names like c 3 698
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 700
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 708
ShortVariable Avoid variables with short names like pp 3 713
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 720
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 726
ControlStatementBraces This statement should have braces 3 732–733
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 755
ShortVariable Avoid variables with short names like lc 3 775
ControlStatementBraces This statement should have braces 3 778–779
ShortVariable Avoid variables with short names like cc 3 802
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 823
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 839
ShortVariable Avoid variables with short names like hc 3 842
ControlStatementBraces This statement should have braces 3 845–846
ShortVariable Avoid variables with short names like p 3 853
ControlStatementBraces This statement should have braces 3 855–856
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 874
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 886
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 891
ShortVariable Avoid variables with short names like pp 3 910
ControlStatementBraces This statement should have braces 3 912–913
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 917
ShortVariable Avoid variables with short names like p 3 928
ControlStatementBraces This statement should have braces 3 930–931
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 942
CollapsibleIfStatements These nested if statements could be combined 3 945–982
ShortVariable Avoid variables with short names like nc 3 947
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 969
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 974
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 985
ControlStatementBraces This statement should have braces 3 1013–1014
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 2 1064
CyclomaticComplexity The method 'parseTableRow(int)' has a cyclomatic complexity of 18. 3 1064–1139
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 2 1064
NPathComplexity The method 'parseTableRow(int)' has an NPath complexity of 5762 3 1064–1139
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 2 1064
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 2 1064
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 2 1064
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 2 1064
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 2 1064
ControlStatementBraces This statement should have braces 3 1079–1080
ShortVariable Avoid variables with short names like th 3 1085
ControlStatementBraces This statement should have braces 3 1088–1089
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1100
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1120
AvoidReassigningParameters Avoid reassigning parameters such as 'start' 2 1146
ControlStatementBraces This statement should have braces 3 1148–1149
NPathComplexity The method 'checkURI(int, int, int)' has an NPath complexity of 290 3 1180–1224
ShortVariable Avoid variables with short names like p 3 1180
ReturnEmptyArrayRatherThanNull Return an empty array rather than null. 1 1180–1224
CyclomaticComplexity The method 'checkURI(int, int, int)' has a cyclomatic complexity of 15. 3 1180–1224
ShortVariable Avoid variables with short names like pb 3 1185
ControlStatementBraces This statement should have braces 3 1187–1188
ShortVariable Avoid variables with short names like pe 3 1190
ControlStatementBraces This statement should have braces 3 1192–1193
ControlStatementBraces This statement should have braces 3 1199–1200
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'e' 3 1234
NcssCount The method 'parseItemThrow(int, String, ContextType)' has a NCSS line count of 185. 3 1238–1636
ExcessiveMethodLength Avoid really long methods. 3 1238–1636
CyclomaticComplexity The method 'parseItemThrow(int, String, ContextType)' has a cyclomatic complexity of 112. 3 1238–1636
NPathComplexity The method 'parseItemThrow(int, String, ContextType)' has an NPath complexity of 18711842 3 1238–1636
ShortVariable Avoid variables with short names like tb 3 1240
ShortVariable Avoid variables with short names like p 3 1243
CollapsibleIfStatements These nested if statements could be combined 3 1257–1262
ShortVariable Avoid variables with short names like c 3 1265
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1269
ControlStatementBraces This statement should have braces 3 1283–1284
ShortVariable Avoid variables with short names like pp 3 1297
ControlStatementBraces This statement should have braces 3 1299–1300
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1332
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1337
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1342
CollapsibleIfStatements These nested if statements could be combined 3 1345–1356
ShortVariable Avoid variables with short names like pp 3 1347
ControlStatementBraces This statement should have braces 3 1349–1350
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1365
CollapsibleIfStatements These nested if statements could be combined 3 1367–1371
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1376
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1392
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1397
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1443
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1462
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1475
CollapsibleIfStatements These nested if statements could be combined 3 1479–1493
AssignmentInOperand Avoid assignments in operands 3 1497
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1504
ShortVariable Avoid variables with short names like pb 3 1511
ShortVariable Avoid variables with short names like pe 3 1512
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1546
CollapsibleIfStatements These nested if statements could be combined 3 1553–1597
ShortVariable Avoid variables with short names like nc 3 1555
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1581
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1586
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 1612
CollapsibleIfStatements These nested if statements could be combined 3 1615–1624
CommentRequired Protected method constructor comments are required 3 1638–1650
CommentRequired Protected method constructor comments are required 3 1652–1677
EmptyCatchBlock Avoid empty catch blocks 3 1661–1663
CommentRequired Protected method constructor comments are required 3 1679–1703
EmptyCatchBlock Avoid empty catch blocks 3 1688–1690
CommentRequired Protected method constructor comments are required 3 1705–1708
CommentRequired Protected method constructor comments are required 3 1710–1725
ShortVariable Avoid variables with short names like i 3 1712
ShortVariable Avoid variables with short names like id 3 1713
ConfusingTernary Avoid if (x != y) ..; else ..; 3 1713
CommentRequired Protected method constructor comments are required 3 1727–1749
CommentRequired Protected method constructor comments are required 3 1751–1766
AssignmentInOperand Avoid assignments in operands 3 1762
CommentRequired Protected method constructor comments are required 3 1768–1771
CommentRequired Header comments are required 3 1773–1783
DefaultPackage Use explicit scoping instead of the default package private level 3 1776
FieldNamingConventions The field name 'position' doesn't match '_[a-z][a-zA-Z0-9]*' 1 1776
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the position field if you want a default access modifier 3 1776
CommentRequired Public method and constructor comments are required 3 1778–1782
CommentRequired Header comments are required 3 1785–1793
CommentRequired Public method and constructor comments are required 3 1789–1792
UnnecessaryModifier Unnecessary modifier 'static' on enum 'ContextType': nested enums are implicitly static 3 1795–1798
CommentRequired Enum comments are required 3 1795–1798

ys/wikiparser/XSSSanitizer.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 6–26
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 6–26
ClassNamingConventions The utility class name 'XSSSanitizer' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 6–26
CommentRequired Public method and constructor comments are required 3 16–24