Rules which enforce generally accepted best practices.
Rules which enforce a specific coding style.
Rules that help you discover design issues.
Rules that are related to code documentation.
Rules to detect constructs that are either broken, extremely confusing or prone to runtime errors.
Rules that flag issues when dealing with multiple threads of execution.
Rules that flag suboptimal code.
Rules that flag potential security flaws.
Android (rulesets/java/android.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
Basic (rulesets/java/basic.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
AvoidBranchingStatementAsLastInLoop, AvoidDecimalLiteralsInBigDecimalConstructor, AvoidMultipleUnaryOperators, AvoidThreadGroup, AvoidUsingHardCodedIP, AvoidUsingOctalValues, BigIntegerInstantiation, BrokenNullCheck, CheckResultSet, CheckSkipResult, ClassCastExceptionWithToArray, CollapsibleIfStatements, DontCallThreadRun, DontUseFloatTypeForLoopIndices, DoubleCheckedLocking, ExtendsObject, ForLoopShouldBeWhileLoop, JumbledIncrementer, MisplacedNullCheck, OverrideBothEqualsAndHashcode, ReturnFromFinallyBlock, SimplifiedTernary, UnconditionalIfStatement
Clone Implementation (rulesets/java/clone.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
CloneMethodMustBePublic, CloneMethodMustImplementCloneable, CloneMethodReturnTypeMustMatchClassName, ProperCloneImplementation
Code Size (rulesets/java/codesize.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
CyclomaticComplexity, ExcessiveClassLength, ExcessiveMethodLength, ExcessiveParameterList, ExcessivePublicCount, NcssCount, NPathComplexity, TooManyFields, TooManyMethods
Comments (rulesets/java/comments.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
CommentContent, CommentDefaultAccessModifier, CommentRequired, CommentSize
Controversial (rulesets/java/controversial.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
AssignmentInOperand, AtLeastOneConstructor, AvoidAccessibilityAlteration, AvoidLiteralsInIfCondition, AvoidUsingNativeCode, AvoidUsingVolatile, CallSuperInConstructor, DoNotCallGarbageCollectionExplicitly, DontImportSun, NullAssignment, OneDeclarationPerLine, OnlyOneReturn, SuspiciousOctalEscape, UnnecessaryConstructor, UnnecessaryParentheses, UseConcurrentHashMap, UseObjectForClearerAPI
Coupling (rulesets/java/coupling.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
CouplingBetweenObjects, ExcessiveImports, LawOfDemeter, LooseCoupling, LoosePackageCoupling
Design (rulesets/java/design.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
AbstractClassWithoutAbstractMethod, AbstractClassWithoutAnyMethod, AccessorClassGeneration, AccessorMethodGeneration, AssignmentToNonFinalStatic, AvoidDeeplyNestedIfStmts, AvoidInstanceofChecksInCatchClause, AvoidProtectedFieldInFinalClass, AvoidProtectedMethodInFinalClassNotExtending, AvoidReassigningParameters, AvoidSynchronizedAtMethodLevel, ClassWithOnlyPrivateConstructorsShouldBeFinal, CloseResource, CompareObjectsWithEquals, ConfusingTernary, ConstantsInInterface, ConstructorCallsOverridableMethod, DataClass, DefaultLabelNotLastInSwitchStmt, EmptyMethodInAbstractClassShouldBeAbstract, EqualsNull, FieldDeclarationsShouldBeAtStartOfClass, FinalFieldCouldBeStatic, GodClass, IdempotentOperations, ImmutableField, InstantiationToGetClass, LogicInversion, MissingStaticMethodInNonInstantiatableClass, NonCaseLabelInSwitchStatement, NonStaticInitializer, NonThreadSafeSingleton, OptimizableToArrayCall, PreserveStackTrace, SimpleDateFormatNeedsLocale, SimplifyBooleanExpressions, SimplifyBooleanReturns, SimplifyConditional, SingleMethodSingleton, SingletonClassReturningNewInstance, SingularField, SwitchDensity, SwitchStmtsShouldHaveDefault, TooFewBranchesForASwitchStatement, UncommentedEmptyConstructor, UncommentedEmptyMethodBody, UnnecessaryLocalBeforeReturn, UseCollectionIsEmpty, UseLocaleWithCaseConversions, UseNotifyAllInsteadOfNotify, UseUtilityClass, UseVarargs
Empty Code (rulesets/java/empty.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
EmptyCatchBlock, EmptyFinallyBlock, EmptyIfStmt, EmptyInitializer, EmptyStatementBlock, EmptyStatementNotInLoop, EmptyStaticInitializer, EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, EmptyWhileStmt
Finalizer (rulesets/java/finalizers.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
AvoidCallingFinalize, EmptyFinalizer, FinalizeDoesNotCallSuperFinalize, FinalizeOnlyCallsSuperFinalize, FinalizeOverloaded, FinalizeShouldBeProtected
Import Statements (rulesets/java/imports.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
J2EE (rulesets/java/j2ee.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
DoNotTerminateVM, DoNotUseThreads, LocalHomeNamingConvention, LocalInterfaceSessionNamingConvention, MDBAndSessionBeanNamingConvention, RemoteInterfaceNamingConvention, RemoteSessionInterfaceNamingConvention, StaticEJBFieldShouldBeFinal, UseProperClassLoader
JavaBeans (rulesets/java/javabeans.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
JUnit (rulesets/java/junit.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
JUnitAssertionsShouldIncludeMessage, JUnitSpelling, JUnitStaticSuite, JUnitTestContainsTooManyAsserts, JUnitTestsShouldIncludeAssert, TestClassWithoutTestCases, UnnecessaryBooleanAssertion
Metrics (rulesets/java/metrics.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
MigratingToJUnit4 (rulesets/java/migrating_to_junit4.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
JUnit4SuitesShouldUseSuiteAnnotation, JUnit4TestShouldUseAfterAnnotation, JUnit4TestShouldUseBeforeAnnotation, JUnit4TestShouldUseTestAnnotation, JUnitUseExpected
Migration (rulesets/java/migrating.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
AvoidAssertAsIdentifier, AvoidEnumAsIdentifier, ForLoopCanBeForeach, JUnit4SuitesShouldUseSuiteAnnotation, JUnit4TestShouldUseAfterAnnotation, JUnit4TestShouldUseBeforeAnnotation, JUnit4TestShouldUseTestAnnotation, JUnitUseExpected, ReplaceEnumerationWithIterator, ReplaceHashtableWithMap, ReplaceVectorWithList
Migration13 (rulesets/java/migrating_to_13.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
ReplaceEnumerationWithIterator, ReplaceHashtableWithMap, ReplaceVectorWithList
Migration14 (rulesets/java/migrating_to_14.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
Migration15 (rulesets/java/migrating_to_15.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
Naming (rulesets/java/naming.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
AvoidDollarSigns, AvoidFieldNameMatchingMethodName, AvoidFieldNameMatchingTypeName, BooleanGetMethodName, ClassNamingConventions, GenericsNaming, LongVariable, MethodNamingConventions, MethodWithSameNameAsEnclosingClass, NoPackage, PackageCase, ShortClassName, ShortMethodName, ShortVariable, SuspiciousEqualsMethodName, SuspiciousHashcodeMethodName
Optimization (rulesets/java/optimizations.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
AddEmptyString, AvoidArrayLoops, AvoidInstantiatingObjectsInLoops, LocalVariableCouldBeFinal, MethodArgumentCouldBeFinal, PrematureDeclaration, RedundantFieldInitializer, UseArrayListInsteadOfVector, UseArraysAsList, UseStringBufferForStringAppends
quickstart (rulesets/java/quickstart.xml
):
Quickstart configuration of PMD. Includes the rules that are most likely to apply everywhere.
It contains the following rules:
AbstractClassWithoutAnyMethod, AssignmentInOperand, AssignmentToNonFinalStatic, AvoidAccessibilityAlteration, AvoidBranchingStatementAsLastInLoop, AvoidCatchingThrowable, AvoidDecimalLiteralsInBigDecimalConstructor, AvoidDollarSigns, AvoidInstanceofChecksInCatchClause, AvoidMessageDigestField, AvoidMultipleUnaryOperators, AvoidProtectedFieldInFinalClass, AvoidProtectedMethodInFinalClassNotExtending, AvoidStringBufferField, AvoidThreadGroup, AvoidUsingHardCodedIP, AvoidUsingOctalValues, AvoidUsingVolatile, BigIntegerInstantiation, BrokenNullCheck, CheckResultSet, CheckSkipResult, ClassCastExceptionWithToArray, ClassNamingConventions, ClassWithOnlyPrivateConstructorsShouldBeFinal, CloneMethodMustBePublic, CloneMethodMustImplementCloneable, CloneMethodReturnTypeMustMatchClassName, CloseResource, CompareObjectsWithEquals, ComparisonWithNaN, ConstantsInInterface, ControlStatementBraces, DefaultLabelNotLastInSwitchStmt, DoNotCallGarbageCollectionExplicitly, DoNotExtendJavaLangError, DoNotExtendJavaLangThrowable, DontCallThreadRun, DontUseFloatTypeForLoopIndices, DoubleBraceInitialization, DoubleCheckedLocking, EmptyCatchBlock, EmptyControlStatement, EmptyFinalizer, EqualsNull, ExtendsObject, FinalFieldCouldBeStatic, FinalParameterInAbstractMethod, ForLoopCanBeForeach, ForLoopShouldBeWhileLoop, FormalParameterNamingConventions, GenericsNaming, GuardLogStatement, IdempotentOperations, IdenticalCatchBranches, ImplicitSwitchFallThrough, InstantiationToGetClass, JumbledIncrementer, LiteralsFirstInComparisons, LocalVariableNamingConventions, LogicInversion, LooseCoupling, MethodNamingConventions, MisplacedNullCheck, MissingOverride, MissingStaticMethodInNonInstantiatableClass, NonCaseLabelInSwitchStatement, NonStaticInitializer, NonThreadSafeSingleton, NoPackage, OneDeclarationPerLine, OptimizableToArrayCall, OverrideBothEqualsAndHashcode, PackageCase, PreserveStackTrace, PrimitiveWrapperInstantiation, ProperCloneImplementation, ProperLogger, ReturnEmptyCollectionRatherThanNull, ReturnFromFinallyBlock, SimplifiableTestAssertion, SimplifiedTernary, SimplifyBooleanReturns, SimplifyConditional, SingleMethodSingleton, SingletonClassReturningNewInstance, SingularField, SuspiciousEqualsMethodName, SuspiciousHashcodeMethodName, SuspiciousOctalEscape, SwitchStmtsShouldHaveDefault, UncommentedEmptyConstructor, UncommentedEmptyMethodBody, UnconditionalIfStatement, UnnecessaryAnnotationValueElement, UnnecessaryConstructor, UnnecessaryConversionTemporary, UnnecessaryFullyQualifiedName, UnnecessaryImport, UnnecessaryLocalBeforeReturn, UnnecessaryModifier, UnnecessaryReturn, UnnecessarySemicolon, UnsynchronizedStaticFormatter, UnusedFormalParameter, UnusedLocalVariable, UnusedNullCheckInEquals, UnusedPrivateField, UnusedPrivateMethod, UseCollectionIsEmpty, UseEqualsToCompareStrings, UselessOperationOnImmutable, UselessOverridingMethod, UselessParentheses, UselessQualifiedThis, UseLocaleWithCaseConversions, UseNotifyAllInsteadOfNotify, UseStandardCharsets, UseUtilityClass
Security Code Guidelines (rulesets/java/sunsecure.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
Strict Exceptions (rulesets/java/strictexception.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
AvoidCatchingGenericException, AvoidCatchingNPE, AvoidCatchingThrowable, AvoidLosingExceptionInformation, AvoidRethrowingException, AvoidThrowingNewInstanceOfSameException, AvoidThrowingNullPointerException, AvoidThrowingRawExceptionTypes, DoNotExtendJavaLangError, DoNotThrowExceptionInFinally, ExceptionAsFlowControl, SignatureDeclareThrowsException
String and StringBuffer (rulesets/java/strings.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
AppendCharacterWithChar, AvoidDuplicateLiterals, AvoidStringBufferField, ConsecutiveAppendsShouldReuse, ConsecutiveLiteralAppends, InefficientEmptyStringCheck, InefficientStringBuffering, InsufficientStringBufferDeclaration, StringBufferInstantiationWithChar, StringInstantiation, StringToString, UnnecessaryCaseChange, UseEqualsToCompareStrings, UseIndexOfChar, UselessStringValueOf, UseStringBufferLength
Type Resolution (rulesets/java/typeresolution.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
CloneMethodMustImplementCloneable, LooseCoupling, SignatureDeclareThrowsException
Unnecessary (rulesets/java/unnecessary.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
UnnecessaryConversionTemporary, UnnecessaryFinalModifier, UnnecessaryModifier, UnnecessaryReturn, UnusedNullCheckInEquals, UselessOperationOnImmutable, UselessOverridingMethod, UselessParentheses, UselessQualifiedThis
Unused Code (rulesets/java/unusedcode.xml
):
Deprecated This ruleset is for backwards compatibility.
It contains the following rules:
UnusedFormalParameter, UnusedLocalVariable, UnusedPrivateField, UnusedPrivateMethod
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4