sevntu-checkstyle / sevntu.checkstyle

Additional Checkstyle checks, that could be added as extension to EclipseCS plugin and maven-checkstyle-plugin, Sonar checkstyle plugin, extension for CheckStyle IDEA plugin.
http://sevntu-checkstyle.github.io/sevntu.checkstyle/
190 stars 146 forks source link

update PMD to version 6.35 #849

Closed pbludov closed 3 years ago

pbludov commented 3 years ago

The PMD version used in this project is a bit outdated, we should update it to the last recent version.

pbludov commented 3 years ago

Issues:

[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.AvoidConstantAsFirstOperandInConditionCheck:70 Rule:UseShortArrayInitializer Priority:3 Array initialization can be written shorter.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.AvoidHidingCauseExceptionCheck:200 Rule:CognitiveComplexity Priority:3 The method 'makeExceptionsList(DetailAST, DetailAST, String)' has a cognitive complexity of 24, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.AvoidHidingCauseExceptionCheck:216 Rule:UnusedAssignment Priority:3 The initializer for variable 'convertedExc' is never used (overwritten on lines 218 and 221).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.ConfusingConditionCheck:295 Rule:UnusedAssignment Priority:3 The initializer for variable 'firstBrace' is never used (overwritten on lines 298 and 305).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.CustomDeclarationOrderCheck:368 Rule:CognitiveComplexity Priority:3 The method 'visitToken(DetailAST)' has a cognitive complexity of 39, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.CustomDeclarationOrderCheck:625 Rule:CognitiveComplexity Priority:3 The method 'getPositionInOrderDeclaration(DetailAST)' has a cognitive complexity of 19, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.CustomDeclarationOrderCheck:1069 Rule:UnusedAssignment Priority:3 The initializer for variable 'result' is never used (overwritten on lines 1072 and 1077).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.CustomDeclarationOrderCheck:1141 Rule:UnusedAssignment Priority:3 The initializer for variable 'result' is never used (overwritten on lines 1152, 1155 and 1160).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.CustomDeclarationOrderCheck:1175 Rule:UnusedAssignment Priority:3 The initializer for variable 'result' is never used (overwritten on lines 1184, 1187 and 1192).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.CustomDeclarationOrderCheck$ClassDetail:1381 Rule:CognitiveComplexity Priority:3 The method 'getWrongOrderedGettersSetters(List, int)' has a cognitive complexity of 18, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.EitherLogOrThrowCheck:360 Rule:CognitiveComplexity Priority:3 The method 'processCatchNode(DetailAST)' has a cognitive complexity of 25, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.ForbidCertainImportsCheck:231 Rule:UnusedAssignment Priority:3 The initializer for variable 'result' is never used (overwritten on lines 240 and 243).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.ForbidCertainMethodCheck$IntRange:255 Rule:UnusedPrivateMethod Priority:3 Avoid unused private methods such as 'from(String)'..
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.ForbidInstantiationCheck:116 Rule:CognitiveComplexity Priority:3 The method 'visitToken(DetailAST)' has a cognitive complexity of 18, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.Jsr305AnnotationsCheck:615 Rule:UnusedAssignment Priority:3 The initializer for variable 'result' is never used (overwritten on line 617).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.MapIterationInForEachLoopCheck:301 Rule:CognitiveComplexity Priority:3 The method 'visitToken(DetailAST)' has a cognitive complexity of 15, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.MapIterationInForEachLoopCheck:405 Rule:CognitiveComplexity Priority:3 The method 'getKeySetOrEntrySetNode(DetailAST)' has a cognitive complexity of 24, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.MapIterationInForEachLoopCheck:502 Rule:CognitiveComplexity Priority:3 The method 'checkForWrongKeySetUsage(DetailAST, String, String, boolean)' has a cognitive complexity of 16, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.MapIterationInForEachLoopCheck:756 Rule:CognitiveComplexity Priority:3 The method 'getSubTreeNodesOfType(DetailAST, int...)' has a cognitive complexity of 15, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.MoveVariableInsideIfCheck:179 Rule:CognitiveComplexity Priority:3 The method 'validateIf(Holder, DetailAST)' has a cognitive complexity of 15, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.MoveVariableInsideIfCheck$Holder:326 Rule:CognitiveComplexity Priority:3 The method 'hasIdent(DetailAST, DetailAST)' has a cognitive complexity of 15, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.MultipleVariableDeclarationsExtendedCheck:108 Rule:CognitiveComplexity Priority:3 The method 'work(DetailAST)' has a cognitive complexity of 15, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.NoNullForCollectionReturnCheck:222 Rule:CognitiveComplexity Priority:3 The method 'isReturnedValueBeNull(DetailAST)' has a cognitive complexity of 27, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.OverridableMethodInConstructorCheck:377 Rule:CognitiveComplexity Priority:3 The method 'isOverridableMethodCall(DetailAST)' has a cognitive complexity of 15, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.OverridableMethodInConstructorCheck:438 Rule:CognitiveComplexity Priority:3 The method 'getMethodName(DetailAST)' has a cognitive complexity of 16, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.OverridableMethodInConstructorCheck:483 Rule:CognitiveComplexity Priority:3 The method 'getMethodDef(DetailAST)' has a cognitive complexity of 35, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.OverridableMethodInConstructorCheck:553 Rule:CognitiveComplexity Priority:3 The method 'getMethodDef(DetailAST, String)' has a cognitive complexity of 15, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.RedundantReturnCheck:239 Rule:UnusedAssignment Priority:3 The initializer for variable 'tryBlockAst' is never used (overwritten on lines 242 and 245).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.RedundantReturnCheck:342 Rule:UnusedAssignment Priority:3 The initializer for variable 'returnAst' is never used (overwritten on line 353).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.RedundantReturnCheck:370 Rule:UnusedAssignment Priority:3 The value assigned to variable 'currentNodeAst' is never used.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.UnnecessaryParenthesesExtendedCheck:176 Rule:CognitiveComplexity Priority:3 The method 'visitToken(DetailAST)' has a cognitive complexity of 22, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.coding.UnnecessaryParenthesesExtendedCheck:245 Rule:CognitiveComplexity Priority:3 The method 'leaveTokenExpression(DetailAST)' has a cognitive complexity of 26, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.ChildBlockLengthCheck:158 Rule:CognitiveComplexity Priority:3 The method 'visitToken(DetailAST)' has a cognitive complexity of 16, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.ForbidWildcardAsReturnTypeCheck:416 Rule:UnusedAssignment Priority:3 The initializer for variable 'result' is never used (overwritten on lines 418 and 439).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.HideUtilityClassConstructorCheck:63 Rule:CognitiveComplexity Priority:3 The method 'visitToken(DetailAST)' has a cognitive complexity of 30, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.NoMainMethodInAbstractClassCheck:142 Rule:UnusedAssignment Priority:3 The initializer for variable 'result' is never used (overwritten on lines 145 and 150).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.NoMainMethodInAbstractClassCheck:219 Rule:UnusedAssignment Priority:3 The initializer for variable 'result' is never used (overwritten on lines 230, 233 and 238).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.NoMainMethodInAbstractClassCheck:253 Rule:UnusedAssignment Priority:3 The initializer for variable 'result' is never used (overwritten on lines 262, 265 and 270).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.PublicReferenceToPrivateTypeCheck:212 Rule:UnusedAssignment Priority:3 The initializer for variable 'returnedType' is never used (overwritten on line 217).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.PublicReferenceToPrivateTypeCheck:231 Rule:CognitiveComplexity Priority:3 The method 'getMethodParameterTypes(DetailAST)' has a cognitive complexity of 16, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.PublicReferenceToPrivateTypeCheck:237 Rule:UnusedAssignment Priority:3 The initializer for variable 'parameterType' is never used (overwritten on line 241).
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.StaticMethodCandidateCheck:77 Rule:UseShortArrayInitializer Priority:3 Array initialization can be written shorter.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.StaticMethodCandidateCheck:86 Rule:UseShortArrayInitializer Priority:3 Array initialization can be written shorter.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.StaticMethodCandidateCheck:331 Rule:CognitiveComplexity Priority:3 The method 'checkFrame(Frame)' has a cognitive complexity of 18, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.StaticMethodCandidateCheck:423 Rule:CognitiveComplexity Priority:3 The method 'isExprAcceptable(Frame, DetailAST)' has a cognitive complexity of 15, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.checks.design.StaticMethodCandidateCheck:650 Rule:CognitiveComplexity Priority:3 The method 'findStaticMethod(Frame, DetailAST, String)' has a cognitive complexity of 15, current threshold is 15.
[INFO] PMD Failure: com.github.sevntu.checkstyle.internal.AllChecksTest:229 Rule:UnusedAssignment Priority:3 The initializer for variable 'path' is never used (overwritten on line 232).
[INFO] PMD Failure: com.github.sevntu.checkstyle.internal.AllChecksTest:255 Rule:UnusedAssignment Priority:3 The initializer for variable 'path' is never used (overwritten on line 258).
romani commented 3 years ago

fix is merged