Uses of Class
net.sourceforge.pmd.lang.java.rule.AbstractJavaRulechainRule
-
-
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.bestpractices
Subclasses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.bestpractices Modifier and Type Class Description classAbstractClassWithoutAbstractMethodRuleclassAccessorClassGenerationRule1.classAccessorMethodGenerationRuleclassArrayIsStoredDirectlyRuleIf a method or constructor receives an array as an argument, the array should be cloned instead of directly stored.classAvoidReassigningLoopVariablesRuleclassAvoidReassigningParametersRuleclassAvoidUsingHardCodedIPRuleclassForLoopCanBeForeachRuleclassGuardLogStatementRuleCheck that log.debug, log.trace, log.error, etc... statements are guarded by some test expression on log.isDebugEnabled() or log.isTraceEnabled().classImplicitFunctionalInterfaceRuleclassJUnitAssertionsShouldIncludeMessageRuleDeprecated.The rule was renamedUnitTestAssertionsShouldIncludeMessageRuleclassJUnitTestContainsTooManyAssertsRuleDeprecated.The rule was renamedUnitTestContainsTooManyAssertsRuleclassJUnitTestsShouldIncludeAssertRuleDeprecated.The rule was renamedUnitTestShouldIncludeAssertRuleclassJUnitUseExpectedRuleThis rule finds code like this:classLiteralsFirstInComparisonsRuleclassLooseCouplingRuleclassMethodReturnsInternalArrayRuleImplementation note: this rule currently ignores return types of y.x.z, currently it handles only local type fields.classMissingOverrideRuleFlags missing @Override annotations.classPreserveStackTraceRuleclassPrimitiveWrapperInstantiationRuleclassRelianceOnDefaultCharsetRuleDetects constructors and methods that use the JVM's default character set instead of explicitly specifying a charset.classSimplifiableTestAssertionRuleclassUnitTestAssertionsShouldIncludeMessageRuleclassUnitTestContainsTooManyAssertsRuleclassUnitTestShouldIncludeAssertRuleclassUnnecessaryVarargsArrayCreationRuleclassUnusedAssignmentRuleclassUnusedFormalParameterRuleclassUnusedPrivateFieldRuleclassUseCollectionIsEmptyRuleDetect structures like "foo.size() == 0" and suggest replacing them with foo.isEmpty().classUseEnumCollectionsRuleDetect cases where EnumSet and EnumMap can be used.classUseTryWithResourcesRule -
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.codestyle
Subclasses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.codestyle Modifier and Type Class Description classClassNamingConventionsRuleConfigurable naming conventions for type declarations.classCommentDefaultAccessModifierRuleCheck for Methods, Fields and Nested Classes that have a default access modifier This rule ignores all nodes annotated with @VisibleForTesting by default.classConfusingTernaryRuleif (x !classEmptyControlStatementRuleclassFieldDeclarationsShouldBeAtStartOfClassRuleDetects fields that are declared after methods, constructors, etc.classFieldNamingConventionsRuleConfigurable naming conventions for field declarations.classFormalParameterNamingConventionsRuleEnforces a naming convention for lambda and method parameters.classIdenticalCatchBranchesRuleFlags identical catch branches, which can be collapsed into a multi-catch.classLambdaCanBeMethodReferenceRuleclassLinguisticNamingRuleclassLocalVariableCouldBeFinalRuleclassLocalVariableNamingConventionsRuleEnforces a naming convention for local variables and other locally scoped variables.classMethodArgumentCouldBeFinalRuleclassMethodNamingConventionsRuleclassModifierOrderRuleclassOnlyOneReturnRuleclassPrematureDeclarationRuleChecks for variables in methods that are defined before they are really needed.classTypeParameterNamingConventionsRuleConfigurable naming conventions for type parameters.classUnnecessaryBoxingRuleclassUnnecessaryCastRuleDetects casts where the operand is already a subtype of the context type, or may be converted to it implicitly.classUnnecessaryFullyQualifiedNameRuleclassUnnecessaryLocalBeforeReturnRuleDeprecated.Since 7.17.0.classUnnecessaryModifierRuleclassUnnecessaryReturnRuleclassUseDiamondOperatorRuleChecks usages of explicit type arguments in a constructor call that may be replaced by a diamond (<>).classUselessParenthesesRuleclassVariableCanBeInlinedRule -
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.design
Subclasses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.design Modifier and Type Class Description classAvoidRethrowingExceptionRuleAvoid rethrowing exceptions unless there's a subsequent catch clause that handles a superclass of the exception being rethrown.classAvoidThrowingNullPointerExceptionRuleFindsthrowstatements containingNullPointerExceptioninstances as thrown valuesclassClassWithOnlyPrivateConstructorsShouldBeFinalRuleclassCognitiveComplexityRuleCognitive complexity rule.classCyclomaticComplexityRuleCyclomatic complexity rule using metrics.classDataClassRuleclassExceptionAsFlowControlRuleCatches the use of exception statements as a flow control device.classExcessiveImportsRuleExcessiveImports attempts to count all unique imports a class contains.classExcessiveParameterListRuleThis rule detects an abnormally long parameter list.classExcessivePublicCountRuleRule attempts to count all public methods and public attributes defined in a class.classFinalFieldCouldBeStaticRuleclassGodClassRuleThe God Class Rule detects the God Class design flaw using metrics.classImmutableFieldRuleclassInvalidJavaBeanRuleclassNcssCountRuleSimple rule for Ncss.classNPathComplexityRuleSimple n-path complexity rule.classSignatureDeclareThrowsExceptionRuleA method/constructor shouldn't explicitly throw java.lang.Exception, since it is unclear which exceptions that can be thrown from the methods.classSimplifyBooleanReturnsRuleclassSimplifyConditionalRuleclassSingularFieldRuleA singular field is a field that may be converted to a local variable.classSwitchDensityRuleSwitch Density - This is the number of statements over the number of cases within a switch.classUselessOverridingMethodRuleclassUseUtilityClassRule -
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.documentation
Subclasses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.documentation Modifier and Type Class Description classCommentContentRuleA rule that checks for illegal words in the comment text.classCommentRequiredRuleclassCommentSizeRuleA rule to manage those who just can't shut up...classDanglingJavadocRuleLooks for Javadoc that doesn't belong to any particular class, method or field. -
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.errorprone
Subclasses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.errorprone Modifier and Type Class Description classAssignmentInOperandRuleclassAssignmentToNonFinalStaticRuleclassAvoidBranchingStatementAsLastInLoopRuleclassAvoidDuplicateLiteralsRuleclassAvoidUsingOctalValuesRuleclassBrokenNullCheckRuleclassCheckSkipResultRuleclassCloneMethodMustImplementCloneableRuleThe method clone() should only be implemented if the class implements the Cloneable interface with the exception of a final method that only throws CloneNotSupportedException.classCollectionTypeMismatchRuleDetects method calls on collections where the passed object cannot possibly be in the collection due to type mismatch.classConfusingArgumentToVarargsMethodRuleclassConstructorCallsOverridableMethodRuleSearches through all methods and constructors called from constructors.classDetachedTestCaseRuleclassIdempotentOperationsRuleclassImplicitSwitchFallThroughRuleclassInvalidLogMessageFormatRuleclassJUnitSpellingRuleclassJUnitStaticSuiteRuleclassNonSerializableClassRuleclassNullAssignmentRuleclassOverrideBothEqualsAndHashCodeOnComparableRuleRule that checksComparableclasses for proper equals/hashCode implementations.classOverrideBothEqualsAndHashcodeRuleclassProperCloneImplementationRuleclassSingleMethodSingletonRuleReturns Checks if the singleton rule is used properly.classSingletonClassReturningNewInstanceRuleclassSuspiciousOctalEscapeRuleclassTestClassWithoutTestCasesRuleclassUnnecessaryCaseChangeRuleclassUselessOperationOnImmutableRuleAn operation on an Immutable object (String, BigDecimal or BigInteger) won't change the object itself.classUselessPureMethodCallRuleReports usages of pure methods where the result is ignored. -
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.internal
Subclasses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.internal with annotations of type with type parameters of type that implement declared as with annotations of type with type parameters of type with annotations of type with annotations of type with type parameters of type that return that return types with arguments of type with parameters of type with type arguments of type that throw with annotations of type with annotations of type with parameters of type with type arguments of type that throw Modifier and Type Class Description classnet.sourceforge.pmd.lang.java.rule.internal.AbstractJavaCounterCheckRule<T extends JavaNode>Abstract class for rules counting the length of some node. -
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.multithreading
Subclasses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.multithreading Modifier and Type Class Description classNonThreadSafeSingletonRuleclassUnsynchronizedStaticFormatterRuleUsing a Formatter (e.g. -
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.performance
Subclasses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.performance Modifier and Type Class Description classAddEmptyStringRuleclassAppendCharacterWithCharRuleThis rule finds the following:classAvoidInstantiatingObjectsInLoopsRuleclassBigIntegerInstantiationRuleRule that marks instantiations of newBigIntegerorBigDecimalobjects, when there is a well-known constant available, such asBigInteger.ZERO.classConsecutiveLiteralAppendsRuleThis rule finds concurrent calls to StringBuffer/Builder.append where String literals are used.classInefficientEmptyStringCheckRuleThis rule finds code which inefficiently determines empty strings.classInefficientStringBufferingRuleHow this rule works: find additive expressions: + check that the addition is between anything other than two literals if true and also the parent is StringBuffer constructor or append, report a violation.classInsufficientStringBufferDeclarationRuleThis rule finds StringBuffers which may have been pre-sized incorrectly.classRedundantFieldInitializerRuleDetects redundant field initializers, i.e. the field initializer expressions the JVM would assign by default.classUseIndexOfCharRuleclassUseStringBufferForStringAppendsRule -
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.security
Subclasses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.security Modifier and Type Class Description classHardCodedCryptoKeyRuleFinds hard coded encryption keys that are passed to javax.crypto.spec.SecretKeySpec(key, algorithm).classInsecureCryptoIvRuleFinds hardcoded static Initialization Vectors vectors used with cryptographic operations.
-