The following document contains the results of PMD 6.13.0.
Rule | Violation | Line |
---|---|---|
ReturnEmptyArrayRatherThanNull | Return an empty array rather than null. | 108–111 |
Rule | Violation | Line |
---|---|---|
ClassNamingConventions | The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 39–80 |
Rule | Violation | Line |
---|---|---|
ClassNamingConventions | The utility class name 'MarkdownCustomInputs' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 13–97 |
Rule | Violation | Line |
---|---|---|
ClassNamingConventions | The utility class name 'Utils' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 32–410 |
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 |
Rule | Violation | Line |
---|---|---|
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 |
Rule | Violation | Line |
---|---|---|
ClassNamingConventions | The utility class name 'XSSSanitizer' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 6–26 |
Rule | Violation | Line |
---|---|---|
AvoidReassigningParameters | Avoid reassigning parameters such as 'strQuery' | 81 |
Rule | Violation | Line |
---|---|---|
AvoidReassigningParameters | Avoid reassigning parameters such as 'topic' | 60 |
Rule | Violation | Line |
---|---|---|
AvoidReassigningParameters | Avoid reassigning parameters such as 'topic' | 1510 |
Rule | Violation | Line |
---|---|---|
AvoidReassigningParameters | Avoid reassigning parameters such as 'text' | 64 |
Rule | Violation | Line |
---|---|---|
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 |
Rule | Violation | Line |
---|---|---|
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 |
Rule | Violation | Line |
---|---|---|
MethodReturnsInternalArray | Returning '_byValue' may expose an internal array. | 99 |
ArrayIsStoredDirectly | The user-supplied array 'value' is stored directly. | 108 |
Rule | Violation | Line |
---|---|---|
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 88–104 |
Rule | Violation | Line |
---|---|---|
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 |
Rule | Violation | Line |
---|---|---|
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 |
Rule | Violation | Line |
---|---|---|
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 |
Rule | Violation | Line |
---|---|---|
DefaultPackage | Use explicit scoping instead of the default package private level | 90–93 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the removeByTopic method if you want a default access modifier | 90–93 |
Rule | Violation | Line |
---|---|---|
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 195 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 261–271 |
Rule | Violation | Line |
---|---|---|
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 113–119 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 121 |
Rule | Violation | Line |
---|---|---|
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 |
Rule | Violation | Line |
---|---|---|
UnusedPrivateField | Avoid unused private fields such as 'PLUGIN_NAME'. | 50 |
Rule | Violation | Line |
---|---|---|
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 |
Rule | Violation | Line |
---|---|---|
CollapsibleIfStatements | These nested if statements could be combined | 104–107 |
Rule | Violation | Line |
---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 46–169 |
Rule | Violation | Line |
---|---|---|
UnusedPrivateField | Avoid unused private fields such as '_plugin'. | 60 |
Rule | Violation | Line |
---|---|---|
CallSuperInConstructor | It is a good practice to call super() in a constructor | 52–55 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 100 |
Rule | Violation | Line |
---|---|---|
UseLocaleWithCaseConversions | When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 56 |
Rule | Violation | Line |
---|---|---|
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 |
Rule | Violation | Line |
---|---|---|
UseLocaleWithCaseConversions | When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 109 |
Rule | Violation | Line |
---|---|---|
UncommentedEmptyMethodBody | Document empty method body | 83–84 |
UncommentedEmptyMethodBody | Document empty method body | 309–310 |
Rule | Violation | Line |
---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 45–84 |
Rule | Violation | Line |
---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 34–1744 |
GodClass | Possible God Class (WMC=57, ATFD=53, TCC=5.807%) | 112–1744 |
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 112–1744 |
ExcessiveClassLength | Avoid really long classes. | 112–1744 |
TooManyMethods | This class has too many methods, consider refactoring it. | 113–1744 |
UnusedPrivateField | Avoid unused private fields such as 'MARK_TOPIC_NAME'. | 138 |
UnusedPrivateField | Avoid unused private fields such as 'MARK_TOPIC_CONTENT_HTML'. | 139 |
UnusedPrivateField | Avoid unused private fields such as 'ACTION_CHANGE_LANGUAGE'. | 183 |
SingularField | Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. | 216 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 230 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 252 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 285 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 285 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 286 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 286 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 308 |
EmptyCatchBlock | Avoid empty catch blocks | 360 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 415 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 416 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 439 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 490 |
UnusedLocalVariable | Avoid unused local variables such as 'strLocale'. | 506 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 512 |
NcssCount | The method 'getModifyTopic(HttpServletRequest)' has a NCSS line count of 62. | 549–645 |
NPathComplexity | The method 'getModifyTopic(HttpServletRequest)' has an NPath complexity of 504 | 549–645 |
CyclomaticComplexity | The method 'getModifyTopic(HttpServletRequest)' has a cyclomatic complexity of 14. | 549–645 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 580–587 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 608 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 615 |
NPathComplexity | The method 'doModifyTopic(HttpServletRequest)' has an NPath complexity of 1152 | 659–741 |
CyclomaticComplexity | The method 'doModifyTopic(HttpServletRequest)' has a cyclomatic complexity of 15. | 659–741 |
NcssCount | The method 'doModifyTopic(HttpServletRequest)' has a NCSS line count of 60. | 659–741 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 661 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 665 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 665 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 666 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 666 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 667 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 667 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 668 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 669 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 671 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 671 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 673 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 676 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 677 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 755 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 756 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 757 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 758 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 760 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 761 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 762 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 763 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 764 |
CyclomaticComplexity | The method 'doUploadImage(HttpServletRequest)' has a cyclomatic complexity of 12. | 934–986 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 938 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 939 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 941 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 949 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 966–974 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 1101 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 1102 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 1228 |
CommentRequired | Public method and constructor comments are required | 1240–1280 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 1247 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 1261 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 1272 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 1274 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 1389–1399 |
CyclomaticComplexity | The method 'getPageExtendedPath(Topic, HttpServletRequest)' has a cyclomatic complexity of 11. | 1510–1560 |
CollapsibleIfStatements | These nested if statements could be combined | 1538–1542 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 1610–1618 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 1674–1685 |
Rule | Violation | Line |
---|---|---|
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 |
Rule | Violation | Line |
---|---|---|
CommentRequired | Header comments are required | 32–410 |
TooManyMethods | This class has too many methods, consider refactoring it. | 33–410 |
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–410 |
LooseCoupling | Avoid using implementation types like 'HashMap'; use the interface instead | 34 |
RedundantFieldInitializer | Avoid using redundant field initializer for 'entities' | 34 |
CommentRequired | Public method and constructor comments are required | 37–50 |
ShortVariable | Avoid variables with short names like c | 37 |
ShortVariable | Avoid variables with short names like c | 52 |
CommentRequired | Public method and constructor comments are required | 52–55 |
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 |
CyclomaticComplexity | The method 'unescapeHTML(String)' has a cyclomatic complexity of 11. | 203–268 |
CommentRequired | Public method and constructor comments are required | 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 |
ShortVariable | Avoid variables with short names like s | 282 |
CommentRequired | Public method and constructor comments are required | 282–292 |
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 |
CyclomaticComplexity | The method 'translit(String)' has a cyclomatic complexity of 17. | 346–389 |
ShortVariable | Avoid variables with short names like s | 346 |
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 |
ShortVariable | Avoid variables with short names like s | 401 |
CommentRequired | Public method and constructor comments are required | 401–404 |
CommentRequired | Public method and constructor comments are required | 406–409 |
ShortVariable | Avoid variables with short names like s | 406 |
Rule | Violation | Line |
---|---|---|
TooManyFields | Too many fields | 46–1799 |
CyclomaticComplexity | The class 'WikiParser' has a total cyclomatic complexity of 297 (highest 112). | 46–1799 |
ExcessiveClassLength | Avoid really long classes. | 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 |
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 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 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 |
AssignmentInOperand | Avoid assignments in operands | 136 |
ControlStatementBraces | This statement should have braces | 136–137 |
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 |
CommentRequired | Public method and constructor comments are required | 668–671 |
MissingOverride | The method 'toString()' is missing an @Override annotation. | 668–671 |
NPathComplexity | The method 'parseBlock()' has an NPath complexity of 6386688 | 688–990 |
CyclomaticComplexity | The method 'parseBlock()' has a cyclomatic complexity of 81. | 688–990 |
NcssCount | The method 'parseBlock()' has a NCSS line count of 146. | 688–990 |
ExcessiveMethodLength | Avoid really long methods. | 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 |
ShortVariable | Avoid variables with short names like p | 1180 |
NPathComplexity | The method 'checkURI(int, int, int)' has an NPath complexity of 290 | 1180–1224 |
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 |
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 |
NcssCount | The method 'parseItemThrow(int, String, ContextType)' has a NCSS line count of 185. | 1238–1636 |
ExcessiveMethodLength | Avoid really long methods. | 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 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the position field if you want a default access modifier | 1776 |
DefaultPackage | Use explicit scoping instead of the default package private level | 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 |
CommentRequired | Enum comments are required | 1795–1798 |
UnnecessaryModifier | Unnecessary modifier 'static' on enum 'ContextType': nested enums are implicitly static | 1795–1798 |
Rule | Violation | Line |
---|---|---|
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 |
Rule | Violation | Line |
---|---|---|
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 |
Rule | Violation | Line |
---|---|---|
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 81–84 |
Rule | Violation | Line |
---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.Locale' | 39 |
Rule | Violation | Line |
---|---|---|
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.business.role.RoleHome' | 52 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.service.template.AppTemplateService' | 68 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.util.html.HtmlTemplate' | 82 |
UnusedImports | Avoid unused imports such as 'java.util.function.Predicate' | 94 |
UnusedImports | Avoid unused imports such as 'javax.servlet.http.HttpSession' | 96 |
UnusedImports | Avoid unused imports such as 'org.bouncycastle.i18n.LocaleString' | 101 |
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' | 479 |
Rule | Violation | Priority | Line |
---|---|---|---|
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
MethodReturnsInternalArray | Returning '_byValue' may expose an internal array. | 3 | 99 |
ArrayIsStoredDirectly | The user-supplied array 'value' is stored directly. | 3 | 108 |
Rule | Violation | Priority | Line |
---|---|---|---|
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 3 | 88–104 |
Rule | Violation | Priority | Line |
---|---|---|---|
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 90–93 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the removeByTopic method if you want a default access modifier | 3 | 90–93 |
Rule | Violation | Priority | Line |
---|---|---|---|
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 195 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 261–271 |
Rule | Violation | Priority | Line |
---|---|---|---|
AvoidReassigningParameters | Avoid reassigning parameters such as 'strQuery' | 2 | 81 |
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 3 | 113–119 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 121 |
Rule | Violation | Priority | Line |
---|---|---|---|
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
UnusedPrivateField | Avoid unused private fields such as 'PLUGIN_NAME'. | 3 | 50 |
Rule | Violation | Priority | Line |
---|---|---|---|
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
CollapsibleIfStatements | These nested if statements could be combined | 3 | 104–107 |
Rule | Violation | Priority | Line |
---|---|---|---|
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
UnusedPrivateField | Avoid unused private fields such as '_plugin'. | 3 | 60 |
Rule | Violation | Priority | Line |
---|---|---|---|
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
UseLocaleWithCaseConversions | When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 3 | 56 |
Rule | Violation | Priority | Line |
---|---|---|---|
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
UseLocaleWithCaseConversions | When doing a String.toLowerCase()/toUpperCase() call, use a Locale | 3 | 109 |
Rule | Violation | Priority | Line |
---|---|---|---|
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 |
Rule | Violation | Priority | Line |
---|---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 3 | 45–84 |
Rule | Violation | Priority | Line |
---|---|---|---|
ClassNamingConventions | The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 39–80 |
Rule | Violation | Priority | Line |
---|---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 3 | 34–1744 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.business.role.RoleHome' | 4 | 52 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.service.template.AppTemplateService' | 4 | 68 |
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.util.html.HtmlTemplate' | 4 | 82 |
UnusedImports | Avoid unused imports such as 'java.util.function.Predicate' | 4 | 94 |
UnusedImports | Avoid unused imports such as 'javax.servlet.http.HttpSession' | 4 | 96 |
UnusedImports | Avoid unused imports such as 'org.bouncycastle.i18n.LocaleString' | 4 | 101 |
GodClass | Possible God Class (WMC=57, ATFD=53, TCC=5.807%) | 3 | 112–1744 |
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 3 | 112–1744 |
ExcessiveClassLength | Avoid really long classes. | 3 | 112–1744 |
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 113–1744 |
UnusedPrivateField | Avoid unused private fields such as 'MARK_TOPIC_NAME'. | 3 | 138 |
UnusedPrivateField | Avoid unused private fields such as 'MARK_TOPIC_CONTENT_HTML'. | 3 | 139 |
UnusedPrivateField | Avoid unused private fields such as 'ACTION_CHANGE_LANGUAGE'. | 3 | 183 |
SingularField | Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. | 3 | 216 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 3 | 230 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 252 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 285 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 285 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 286 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 286 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 308 |
EmptyCatchBlock | Avoid empty catch blocks | 3 | 360 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 415 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 416 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 439 |
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 | 479 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 3 | 490 |
UnusedLocalVariable | Avoid unused local variables such as 'strLocale'. | 3 | 506 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 512 |
NcssCount | The method 'getModifyTopic(HttpServletRequest)' has a NCSS line count of 62. | 3 | 549–645 |
NPathComplexity | The method 'getModifyTopic(HttpServletRequest)' has an NPath complexity of 504 | 3 | 549–645 |
CyclomaticComplexity | The method 'getModifyTopic(HttpServletRequest)' has a cyclomatic complexity of 14. | 3 | 549–645 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 580–587 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 608 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 615 |
NPathComplexity | The method 'doModifyTopic(HttpServletRequest)' has an NPath complexity of 1152 | 3 | 659–741 |
CyclomaticComplexity | The method 'doModifyTopic(HttpServletRequest)' has a cyclomatic complexity of 15. | 3 | 659–741 |
NcssCount | The method 'doModifyTopic(HttpServletRequest)' has a NCSS line count of 60. | 3 | 659–741 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 661 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 665 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 665 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 666 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 666 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 667 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 667 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 668 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 669 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 671 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 671 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 3 | 673 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 676 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 677 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 755 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 756 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 757 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 758 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 760 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 761 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 762 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 763 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 764 |
CyclomaticComplexity | The method 'doUploadImage(HttpServletRequest)' has a cyclomatic complexity of 12. | 3 | 934–986 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 938 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 939 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 941 |
AvoidLiteralsInIfCondition | Avoid using Literals in Conditional Statements | 3 | 949 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 966–974 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 1101 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 1102 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 1228 |
CommentRequired | Public method and constructor comments are required | 3 | 1240–1280 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 1247 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 1261 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 1272 |
PreserveStackTrace | New exception is thrown in catch block, original stack trace may be lost | 3 | 1274 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 1389–1399 |
CyclomaticComplexity | The method 'getPageExtendedPath(Topic, HttpServletRequest)' has a cyclomatic complexity of 11. | 3 | 1510–1560 |
AvoidReassigningParameters | Avoid reassigning parameters such as 'topic' | 2 | 1510 |
CollapsibleIfStatements | These nested if statements could be combined | 3 | 1538–1542 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 1610–1618 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 1674–1685 |
Rule | Violation | Priority | Line |
---|---|---|---|
ImportFromSamePackage | No need to import a type that lives in the same package | 3 | 6 |
CommentRequired | Header comments are required | 3 | 13–97 |
ClassNamingConventions | The utility class name 'MarkdownCustomInputs' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 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 |
Rule | Violation | Priority | Line |
---|---|---|---|
ClassNamingConventions | The utility class name 'Utils' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 32–410 |
CommentRequired | Header comments are required | 3 | 32–410 |
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 33–410 |
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–410 |
LooseCoupling | Avoid using implementation types like 'HashMap'; use the interface instead | 3 | 34 |
RedundantFieldInitializer | Avoid using redundant field initializer for 'entities' | 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 |
ShortVariable | Avoid variables with short names like c | 3 | 52 |
CommentRequired | Public method and constructor comments are required | 3 | 52–55 |
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 |
CyclomaticComplexity | The method 'unescapeHTML(String)' has a cyclomatic complexity of 11. | 3 | 203–268 |
CommentRequired | Public method and constructor comments are required | 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 |
ShortVariable | Avoid variables with short names like s | 3 | 282 |
CommentRequired | Public method and constructor comments are required | 3 | 282–292 |
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 |
CyclomaticComplexity | The method 'translit(String)' has a cyclomatic complexity of 17. | 3 | 346–389 |
ShortVariable | Avoid variables with short names like s | 3 | 346 |
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 |
ShortVariable | Avoid variables with short names like s | 3 | 401 |
CommentRequired | Public method and constructor comments are required | 3 | 401–404 |
CommentRequired | Public method and constructor comments are required | 3 | 406–409 |
ShortVariable | Avoid variables with short names like s | 3 | 406 |
Rule | Violation | Priority | Line |
---|---|---|---|
TooManyFields | Too many fields | 3 | 46–1799 |
CyclomaticComplexity | The class 'WikiParser' has a total cyclomatic complexity of 297 (highest 112). | 3 | 46–1799 |
ExcessiveClassLength | Avoid really long classes. | 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 |
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 |
FieldNamingConventions | The field name 'sb' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 72 |
ShortVariable | Avoid variables with short names like sb | 3 | 72 |
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 'toc' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 73 |
RedundantFieldInitializer | Avoid using redundant field initializer for 'tocLevel' | 3 | 74 |
FieldNamingConventions | The field name 'tocLevel' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 74 |
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 |
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 |
FieldNamingConventions | The field name 'wikiText' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 76 |
RedundantFieldInitializer | Avoid using redundant field initializer for 'pos' | 3 | 77 |
FieldNamingConventions | The field name 'pos' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 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 |
RedundantFieldInitializer | Avoid using redundant field initializer for 'blockquoteBR' | 3 | 80 |
FieldNamingConventions | The field name 'blockquoteBR' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 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 |
RedundantFieldInitializer | Avoid using redundant field initializer for 'HEADING_ID_PREFIX' | 3 | 84 |
FieldNamingConventions | The field name 'HEADING_ID_PREFIX' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 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 |
AssignmentInOperand | Avoid assignments in operands | 3 | 136 |
ControlStatementBraces | This statement should have braces | 3 | 136–137 |
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 |
CommentRequired | Public method and constructor comments are required | 3 | 668–671 |
MissingOverride | The method 'toString()' is missing an @Override annotation. | 3 | 668–671 |
NPathComplexity | The method 'parseBlock()' has an NPath complexity of 6386688 | 3 | 688–990 |
CyclomaticComplexity | The method 'parseBlock()' has a cyclomatic complexity of 81. | 3 | 688–990 |
NcssCount | The method 'parseBlock()' has a NCSS line count of 146. | 3 | 688–990 |
ExcessiveMethodLength | Avoid really long methods. | 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 |
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 |
CyclomaticComplexity | The method 'parseTableRow(int)' has a cyclomatic complexity of 18. | 3 | 1064–1139 |
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 |
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 |
ReturnEmptyArrayRatherThanNull | Return an empty array rather than null. | 1 | 1180–1224 |
ShortVariable | Avoid variables with short names like p | 3 | 1180 |
NPathComplexity | The method 'checkURI(int, int, int)' has an NPath complexity of 290 | 3 | 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 |
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 |
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 |
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 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the position field if you want a default access modifier | 3 | 1776 |
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 |
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 |
CommentRequired | Enum comments are required | 3 | 1795–1798 |
UnnecessaryModifier | Unnecessary modifier 'static' on enum 'ContextType': nested enums are implicitly static | 3 | 1795–1798 |
Rule | Violation | Priority | Line |
---|---|---|---|
ClassNamingConventions | The utility class name 'XSSSanitizer' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 6–26 |
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 |
CommentRequired | Public method and constructor comments are required | 3 | 16–24 |