net.sourceforge.pmd.rules.design |
|
Java Source File Name | Type | Comment |
AssignmentToNonFinalStatic.java | Class | |
CompareObjectsWithEquals.java | Class | |
ConfusingTernary.java | Class | if (x != y) { diff(); } else { same(); } and
(!x ? diff() : same());.
XPath can handle the easy cases, e.g.:
//IfStatement[
Statement[2]
and Expression[
EqualityExpression[@Image="!="] or
UnaryExpressionNotPlusMinus[@Image="!"]]]
but "&&" and "||" are difficult, since we need a match
for all children instead of just one. |
ExceptionAsFlowControl.java | Class | Catches the use of exception statements as a flow control device. |
ExcessiveLengthRule.java | Class | This is a common super class for things which
have excessive length.
i.e. |
ExcessiveNodeCountRule.java | Class | This is a common super class for things which
shouldn't have excessive nodes underneath.
It expects all "visit" calls to return an
Integer. |
GenericClassCounterRule.java | Class | 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.
Example of configurations:
|