Uses of Class
net.sourceforge.pmd.lang.java.rule.AbstractJavaRulechainRule
Packages that use AbstractJavaRulechainRule
Package
Description
-
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.bestpractices
Modifier and TypeClassDescriptionclassclass1.classclassIf a method or constructor receives an array as an argument, the array should be cloned instead of directly stored.classclassclassclassclassCheck that log.debug, log.trace, log.error, etc... statements are guarded by some test expression on log.isDebugEnabled() or log.isTraceEnabled().classclassDeprecated.classDeprecated.The rule was renamedUnitTestContainsTooManyAssertsRuleclassDeprecated.The rule was renamedUnitTestShouldIncludeAssertRuleclassThis rule finds code like this:classclassclassImplementation note: this rule currently ignores return types of y.x.z, currently it handles only local type fields.classFlags missing @Override annotations.classclassclassDetects constructors and methods that use the JVM's default character set instead of explicitly specifying a charset.classclassclassclassclassclassclassclassclassDetect structures like "foo.size() == 0" and suggest replacing them with foo.isEmpty().classDetect cases where EnumSet and EnumMap can be used.final class -
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.codestyle
Subclasses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.codestyleModifier and TypeClassDescriptionclassConfigurable naming conventions for type declarations.classCheck for Methods, Fields and Nested Classes that have a default access modifier This rule ignores all nodes annotated with @VisibleForTesting by default.classif (x !classclassDetects fields that are declared after methods, constructors, etc.classConfigurable naming conventions for field declarations.final classEnforces a naming convention for lambda and method parameters.classFlags identical catch branches, which can be collapsed into a multi-catch.classclassclassfinal classEnforces a naming convention for local variables and other locally scoped variables.classclassclassclassclassChecks for variables in methods that are defined before they are really needed.classConfigurable naming conventions for type parameters.classclassDetects casts where the operand is already a subtype of the context type, or may be converted to it implicitly.classclassDeprecated.Since 7.17.0.classclassclassChecks usages of explicit type arguments in a constructor call that may be replaced by a diamond (<>).final classclass -
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.design
Subclasses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.designModifier and TypeClassDescriptionclassAvoid rethrowing exceptions unless there's a subsequent catch clause that handles a superclass of the exception being rethrown.classFindsthrowstatements containingNullPointerExceptioninstances as thrown valuesclassclassCognitive complexity rule.classCyclomatic complexity rule using metrics.classclassCatches the use of exception statements as a flow control device.classExcessiveImports attempts to count all unique imports a class contains.classThis rule detects an abnormally long parameter list.classRule attempts to count all public methods and public attributes defined in a class.classclassThe God Class Rule detects the God Class design flaw using metrics.classclassfinal classSimple rule for Ncss.classSimple n-path complexity rule.classA method/constructor shouldn't explicitly throw java.lang.Exception, since it is unclear which exceptions that can be thrown from the methods.classclassclassA singular field is a field that may be converted to a local variable.classSwitch Density - This is the number of statements over the number of cases within a switch.classclass -
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.documentation
Modifier and TypeClassDescriptionclassA rule that checks for illegal words in the comment text.classclassA rule to manage those who just can't shut up...classLooks 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.errorproneModifier and TypeClassDescriptionclassclassclassclassclassclassclassclassThe method clone() should only be implemented if the class implements the Cloneable interface with the exception of a final method that only throws CloneNotSupportedException.classDetects method calls on collections where the passed object cannot possibly be in the collection due to type mismatch.classfinal classSearches through all methods and constructors called from constructors.classclassclassDetects conditional expressions and statements where both branches are equal.classclassclassclassclassclassclassRule that checksComparableclasses for proper equals/hashCode implementations.classclassclassReturns Checks if the singleton rule is used properly.classclassclassclassclassAn operation on an Immutable object (String, BigDecimal or BigInteger) won't change the object itself.classReports 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.internalModifier and TypeClassDescriptionclassnet.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
Modifier and TypeClassDescriptionclassclassUsing 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.performanceModifier and TypeClassDescriptionclassclassThis rule finds the following:classclassRule that marks instantiations of newBigIntegerorBigDecimalobjects, when there is a well-known constant available, such asBigInteger.ZERO.classThis rule finds concurrent calls to StringBuffer/Builder.append where String literals are used.classThis rule finds code which inefficiently determines empty strings.classHow 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.classThis rule finds StringBuffers which may have been pre-sized incorrectly.classDetects redundant field initializers, i.e. the field initializer expressions the JVM would assign by default.classclass -
Uses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.security
Subclasses of AbstractJavaRulechainRule in net.sourceforge.pmd.lang.java.rule.securityModifier and TypeClassDescriptionclassFinds hard coded encryption keys that are passed to javax.crypto.spec.SecretKeySpec(key, algorithm).classFinds hardcoded static Initialization Vectors vectors used with cryptographic operations.
UnitTestAssertionsShouldIncludeMessageRule