Modifier and Type | Class | Description |
---|---|---|
class |
JavaDFAGraphRule |
Modifier and Type | Class | Description |
---|---|---|
class |
AbstractIgnoredAnnotationRule |
|
class |
AbstractInefficientZeroCheck |
This is an abstract rule for patterns which compare a method invocation to 0.
|
class |
AbstractJavaMetricsRule |
Java Rule with convenient visit methods to e.g.
|
class |
AbstractJUnitRule |
|
class |
AbstractLombokAwareRule |
Base class for rules, that should ignore classes/fields that are annotated
with Lombok annotations.
|
class |
AbstractPoorMethodCall |
Detects and flags the occurrences of specific method calls against an
instance of a designated class.
|
class |
AbstractStatisticalJavaRule |
|
class |
GenericLiteralCheckerRule |
This class allow to match a Literal (most likely a String) with a regex
pattern.
|
class |
StringConcatenationRule |
|
class |
SymbolTableTestRule |
|
class |
UselessAssignment |
Modifier and Type | Class | Description |
---|---|---|
class |
AbstractSunSecureRule |
Utility methods for the package
Created on Jan 17, 2005
|
class |
AccessorClassGenerationRule |
1.
|
class |
AccessorMethodGenerationRule |
|
class |
ArrayIsStoredDirectlyRule |
If a method or constructor receives an array as an argument, the array should
be cloned instead of directly stored.
|
class |
AvoidReassigningParametersRule |
|
class |
AvoidUsingHardCodedIPRule |
|
class |
CheckResultSetRule |
Rule that verifies, that the return values of next(), first(), last(), etc.
|
class |
ForLoopCanBeForeachRule |
|
class |
GuardLogStatementRule |
Check that log.debug, log.trace, log.error, etc...
|
class |
JUnitAssertionsShouldIncludeMessageRule |
|
class |
JUnitTestsShouldIncludeAssertRule |
|
class |
JUnitUseExpectedRule |
This rule finds code like this:
|
class |
LooseCouplingRule |
|
class |
MethodReturnsInternalArrayRule |
Implementation note: this rule currently ignores return types of y.x.z,
currently it handles only local type fields.
|
class |
MissingOverrideRule |
Flags missing @Override annotations.
|
class |
PreserveStackTraceRule |
|
class |
UnusedFormalParameterRule |
|
class |
UnusedImportsRule |
|
class |
UnusedLocalVariableRule |
|
class |
UnusedPrivateFieldRule |
|
class |
UnusedPrivateMethodRule |
This rule detects private methods, that are not used and can therefore be
deleted.
|
class |
UseCollectionIsEmptyRule |
Detect structures like "foo.size() == 0" and suggest replacing them with
foo.isEmpty().
|
Modifier and Type | Class | Description |
---|---|---|
class |
AvoidDollarSignsRule |
|
class |
ClassNamingConventionsRule |
Configurable naming conventions for type declarations.
|
class |
CommentDefaultAccessModifierRule |
Check for Methods, Fields and Nested Classes that have a default access
modifier
|
class |
ConfusingTernaryRule |
if (x != y) { diff(); } else { same(); } and(!x ? diff() : same()); |
class |
DontImportJavaLangRule |
|
class |
DuplicateImportsRule |
|
class |
FieldDeclarationsShouldBeAtStartOfClassRule |
Detects fields that are declared after methods, constructors, etc.
|
class |
LocalVariableCouldBeFinalRule |
|
class |
MethodArgumentCouldBeFinalRule |
|
class |
MethodNamingConventionsRule |
|
class |
OnlyOneReturnRule |
|
class |
PrematureDeclarationRule |
Checks for variables in methods that are defined before they are really
needed.
|
class |
UnnecessaryAnnotationValueElementRule |
|
class |
UnnecessaryConstructorRule |
This rule detects when a constructor is not necessary;
i.e., when there is only one constructor, it’s public, has an empty body,
and takes no arguments.
|
class |
UnnecessaryFullyQualifiedNameRule |
|
class |
UnnecessaryLocalBeforeReturnRule |
|
class |
UnnecessaryModifierRule |
|
class |
UnnecessaryReturnRule |
|
class |
VariableNamingConventionsRule |
Modifier and Type | Class | Description |
---|---|---|
class |
AbstractNcssCountRule |
Abstract superclass for NCSS counting methods.
|
class |
AvoidDeeplyNestedIfStmtsRule |
|
class |
CouplingBetweenObjectsRule |
CouplingBetweenObjects attempts to capture all unique Class attributes, local
variables, and return types to determine how many objects a class is coupled
to.
|
class |
CyclomaticComplexityRule |
Cyclomatic complexity rule using metrics.
|
class |
DataClassRule |
|
class |
ExceptionAsFlowControlRule |
Catches the use of exception statements as a flow control device.
|
class |
ExcessiveClassLengthRule |
This rule detects when a class exceeds a certain threshold.
|
class |
ExcessiveImportsRule |
ExcessiveImports attempts to count all unique imports a class contains.
|
class |
ExcessiveLengthRule |
This is a common super class for things which have excessive length.
|
class |
ExcessiveMethodLengthRule |
This rule detects when a method exceeds a certain threshold.
|
class |
ExcessiveNodeCountRule |
This is a common super class for things which shouldn't have excessive nodes
underneath.
|
class |
ExcessiveParameterListRule |
This rule detects an abnormally long parameter list.
|
class |
ExcessivePublicCountRule |
Rule attempts to count all public methods and public attributes
defined in a class.
|
class |
GenericClassCounterRule |
A generic rule that can be configured to "count" classes of certain type
based on either their name (full name, prefix, suffixes anything can be
matched with a regex), and/or their type.
|
class |
GodClassRule |
The God Class Rule detects the God Class design flaw using metrics.
|
class |
ImmutableFieldRule |
|
class |
LawOfDemeterRule |
This rule can detect possible violations of the Law of Demeter.
|
class |
LoosePackageCouplingRule |
The loose package coupling Rule can be used to ensure coupling outside of a
package hierarchy is minimized to all but an allowed set of classes from
within the package hierarchy.
|
class |
ModifiedCyclomaticComplexityRule |
Implements the modified cyclomatic complexity rule
|
class |
NcssConstructorCountRule |
Non-commented source statement counter for constructors.
|
class |
NcssCountRule |
Simple rule for Ncss.
|
class |
NcssMethodCountRule |
Non-commented source statement counter for methods.
|
class |
NcssTypeCountRule |
Non-commented source statement counter for type declarations.
|
class |
NPathComplexityRule |
Simple n-path complexity rule.
|
class |
PositionalIteratorRule |
|
class |
SignatureDeclareThrowsExceptionRule |
A method/constructor shouldn't explicitly throw java.lang.Exception, since it
is unclear which exceptions that can be thrown from the methods.
|
class |
SimplifyBooleanReturnsRule |
|
class |
SingularFieldRule |
|
class |
StdCyclomaticComplexityRule |
Implements the standard cyclomatic complexity rule
|
class |
SwitchDensityRule |
Switch Density - This is the number of statements over the number of
cases within a switch.
|
class |
TooManyFieldsRule |
|
class |
UselessOverridingMethodRule |
|
class |
UseUtilityClassRule |
Modifier and Type | Class | Description |
---|---|---|
class |
AbstractCommentRule |
|
class |
CodeInCommentsRule |
|
class |
CommentContentRule |
A rule that checks for illegal words in the comment text.
|
class |
CommentRequiredRule |
|
class |
CommentSizeRule |
A rule to manage those who just can't shut up...
|
class |
HeaderCommentsRule |
Restrictions regarding the legal placement and content of the file header.
|
class |
JavadocRule |
Modifier and Type | Class | Description |
---|---|---|
class |
UnnecessaryCastRule |
This is a rule, that detects unnecessary casts when using Java 1.5 generics
and collections.
|
Modifier and Type | Class | Description |
---|---|---|
class |
DoubleCheckedLockingRule |
void method() {
if (x == null) {
synchronized(this){
if (x == null) {
x = new | method();
}
}
}
}
|
class |
NonThreadSafeSingletonRule |
|
class |
UnsynchronizedStaticDateFormatterRule |
Using a DateFormatter (SimpleDateFormatter) which is static can cause
unexpected results when used in a multi-threaded environment.
|
Modifier and Type | Class | Description |
---|---|---|
class |
AbstractOptimizationRule |
Base class with utility methods for optimization rules
|
class |
AppendCharacterWithCharRule |
This rule finds the following:
|
class |
AvoidInstantiatingObjectsInLoopsRule |
|
class |
BigIntegerInstantiationRule |
Rule that marks instantiations of new
BigInteger or
BigDecimal objects, when there is a well-known constant available,
such as BigInteger.ZERO . |
class |
BooleanInstantiationRule |
Avoid instantiating Boolean objects; you can reference Boolean.TRUE,
Boolean.FALSE, or call Boolean.valueOf() instead.
|
class |
ConsecutiveAppendsShouldReuseRule |
Original rule was written with XPath, but didn't verify whether the two calls
to append would have been done on the same variable.
|
class |
ConsecutiveLiteralAppendsRule |
This rule finds concurrent calls to StringBuffer/Builder.append where String
literals are used It would be much better to make these calls using one call
to
.append |
class |
InefficientEmptyStringCheckRule |
This rule finds code which inefficiently determines empty strings.
|
class |
InefficientStringBufferingRule |
How 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.
|
class |
InsufficientStringBufferDeclarationRule |
This rule finds StringBuffers which may have been pre-sized incorrectly.
|
class |
RedundantFieldInitializerRule |
Detects redundant field initializers, i.e.
|
class |
StringInstantiationRule |
|
class |
StringToStringRule |
|
class |
UnnecessaryWrapperObjectCreationRule |
|
class |
UseIndexOfCharRule |
|
class |
UselessStringValueOfRule |
|
class |
UseStringBufferForStringAppendsRule |
|
class |
UseStringBufferLengthRule |
This rule finds places where StringBuffer.toString() is called just to see if
the string is 0 length by either using .equals("") or toString().length().
|
Modifier and Type | Class | Description |
---|---|---|
class |
InsecureCryptoIvRule |
Finds hardcoded static Initialization Vectors vectors used with cryptographic
operations.
|
Copyright © 2002–2018 PMD. All rights reserved.