Files
sheepit-shadow-nabber/rulesets/java-sheepit.xml

150 lines
9.3 KiB
XML
Raw Normal View History

2024-06-03 14:02:30 +00:00
<?xml version="1.0"?>
<ruleset name="Custom Rules"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>
SheepIt client custom rules
</description>
<rule ref="category/java/bestpractices.xml/AbstractClassWithoutAbstractMethod" />
<rule ref="category/java/bestpractices.xml/AccessorClassGeneration" />
<rule ref="category/java/bestpractices.xml/AccessorMethodGeneration" />
<rule ref="category/java/bestpractices.xml/ArrayIsStoredDirectly" />
<rule ref="category/java/bestpractices.xml/AvoidMessageDigestField" />
<rule ref="category/java/bestpractices.xml/AvoidReassigningCatchVariables" />
<rule ref="category/java/bestpractices.xml/AvoidStringBufferField" />
2024-06-03 14:02:30 +00:00
<rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP" />
<rule ref="category/java/bestpractices.xml/CheckResultSet" />
<rule ref="category/java/bestpractices.xml/ConstantsInInterface" />
<rule ref="category/java/bestpractices.xml/DoubleBraceInitialization" />
<rule ref="category/java/bestpractices.xml/ForLoopCanBeForeach" />
<rule ref="category/java/bestpractices.xml/ForLoopVariableCount" />
<rule ref="category/java/bestpractices.xml/JUnitTestsShouldIncludeAssert" />
<rule ref="category/java/bestpractices.xml/JUnitUseExpected" />
<rule ref="category/java/bestpractices.xml/LiteralsFirstInComparisons" />
<rule ref="category/java/bestpractices.xml/LooseCoupling" />
<rule ref="category/java/bestpractices.xml/MethodReturnsInternalArray" />
<rule ref="category/java/bestpractices.xml/MissingOverride" />
<rule ref="category/java/bestpractices.xml/OneDeclarationPerLine" />
2024-06-03 14:02:30 +00:00
<rule ref="category/java/bestpractices.xml/PrimitiveWrapperInstantiation" />
<rule ref="category/java/bestpractices.xml/ReplaceEnumerationWithIterator" />
<rule ref="category/java/bestpractices.xml/ReplaceVectorWithList" />
<rule ref="category/java/bestpractices.xml/SimplifiableTestAssertion" />
<rule ref="category/java/bestpractices.xml/UnusedAssignment" />
2024-06-03 14:02:30 +00:00
<rule ref="category/java/bestpractices.xml/UnusedFormalParameter" />
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable" />
<rule ref="category/java/bestpractices.xml/UnusedPrivateField" />
2024-06-03 14:02:30 +00:00
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod" />
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty" />
<rule ref="category/java/bestpractices.xml/UseStandardCharsets" />
<rule ref="category/java/bestpractices.xml/UseVarargs" />
<rule ref="category/java/bestpractices.xml/WhileLoopWithLiteralBoolean" />
2024-06-03 14:02:30 +00:00
<rule ref="category/java/codestyle.xml/ExtendsObject" />
<rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop" />
<rule ref="category/java/codestyle.xml/TooManyStaticImports" />
<rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName" />
<rule ref="category/java/codestyle.xml/UnnecessaryImport" />
<rule ref="category/java/codestyle.xml/UnnecessaryReturn" />
<rule ref="category/java/codestyle.xml/UnnecessarySemicolon" />
2024-06-03 14:02:30 +00:00
<rule ref="category/java/codestyle.xml/UselessQualifiedThis" />
<rule ref="category/java/design.xml/AbstractClassWithoutAnyMethod" />
<rule ref="category/java/design.xml/AvoidThrowingNullPointerException" />
<rule ref="category/java/design.xml/ClassWithOnlyPrivateConstructorsShouldBeFinal" />
<rule ref="category/java/design.xml/DoNotExtendJavaLangError" />
<rule ref="category/java/design.xml/ExcessivePublicCount" />
<rule ref="category/java/design.xml/InvalidJavaBean" />
<rule ref="category/java/design.xml/LogicInversion" />
2024-06-03 14:02:30 +00:00
<rule ref="category/java/design.xml/SimplifiedTernary" />
<rule ref="category/java/design.xml/SimplifyBooleanReturns" />
<rule ref="category/java/design.xml/SimplifyConditional" />
2024-06-03 14:02:30 +00:00
<rule ref="category/java/design.xml/UselessOverridingMethod" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/errorprone.xml/AssignmentToNonFinalStatic" />
<rule ref="category/java/errorprone.xml/AvoidAssertAsIdentifier" />
<rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/errorprone.xml/AvoidCallingFinalize" />
<rule ref="category/java/errorprone.xml/AvoidCatchingThrowable" />
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/errorprone.xml/AvoidEnumAsIdentifier" />
<rule ref="category/java/errorprone.xml/AvoidFieldNameMatchingTypeName" />
<rule ref="category/java/errorprone.xml/AvoidLosingExceptionInformation" />
<rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators" />
<rule ref="category/java/errorprone.xml/AvoidUsingOctalValues" />
<rule ref="category/java/errorprone.xml/BrokenNullCheck" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/errorprone.xml/CallSuperFirst" />
<rule ref="category/java/errorprone.xml/CallSuperLast" />
<rule ref="category/java/errorprone.xml/CheckSkipResult" />
<rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/errorprone.xml/CloneMethodMustBePublic" />
<rule ref="category/java/errorprone.xml/CloneMethodMustImplementCloneable" />
<rule ref="category/java/errorprone.xml/CloneMethodReturnTypeMustMatchClassName" />
<rule ref="category/java/errorprone.xml/ComparisonWithNaN" />
<rule ref="category/java/errorprone.xml/DetachedTestCase" />
<rule ref="category/java/errorprone.xml/DoNotExtendJavaLangThrowable" />
<rule ref="category/java/errorprone.xml/DoNotHardCodeSDCard" />
<rule ref="category/java/errorprone.xml/DoNotThrowExceptionInFinally" />
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/errorprone.xml/EmptyFinalizer" />
<rule ref="category/java/errorprone.xml/EqualsNull" />
<rule ref="category/java/errorprone.xml/FinalizeOverloaded" />
<rule ref="category/java/errorprone.xml/FinalizeShouldBeProtected" />
<rule ref="category/java/errorprone.xml/IdempotentOperations" />
<rule ref="category/java/errorprone.xml/InstantiationToGetClass" />
<rule ref="category/java/errorprone.xml/InvalidLogMessageFormat" />
<rule ref="category/java/errorprone.xml/JumbledIncrementer" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/errorprone.xml/JUnitSpelling" />
<rule ref="category/java/errorprone.xml/JUnitStaticSuite" />
<rule ref="category/java/errorprone.xml/MethodWithSameNameAsEnclosingClass" />
<rule ref="category/java/errorprone.xml/MisplacedNullCheck" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/errorprone.xml/MissingStaticMethodInNonInstantiatableClass" />
<rule ref="category/java/errorprone.xml/MoreThanOneLogger" />
<rule ref="category/java/errorprone.xml/NonCaseLabelInSwitchStatement" />
<rule ref="category/java/errorprone.xml/NonStaticInitializer" />
<rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/errorprone.xml/ProperCloneImplementation" />
<rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/errorprone.xml/SingleMethodSingleton" />
<rule ref="category/java/errorprone.xml/SingletonClassReturningNewInstance" />
<rule ref="category/java/errorprone.xml/StaticEJBFieldShouldBeFinal" />
<rule ref="category/java/errorprone.xml/StringBufferInstantiationWithChar" />
<rule ref="category/java/errorprone.xml/SuspiciousEqualsMethodName" />
<rule ref="category/java/errorprone.xml/SuspiciousHashcodeMethodName" />
<rule ref="category/java/errorprone.xml/SuspiciousOctalEscape" />
<rule ref="category/java/errorprone.xml/TestClassWithoutTestCases" />
<rule ref="category/java/errorprone.xml/UnconditionalIfStatement" />
<rule ref="category/java/errorprone.xml/UnnecessaryBooleanAssertion" />
<rule ref="category/java/errorprone.xml/UnnecessaryCaseChange" />
<rule ref="category/java/errorprone.xml/UnnecessaryConversionTemporary" />
<rule ref="category/java/errorprone.xml/UnusedNullCheckInEquals" />
<rule ref="category/java/errorprone.xml/UselessOperationOnImmutable" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/errorprone.xml/UseProperClassLoader" />
2024-06-03 14:02:30 +00:00
<rule ref="category/java/multithreading.xml/AvoidThreadGroup" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/multithreading.xml/AvoidUsingVolatile" />
2024-06-03 14:02:30 +00:00
<rule ref="category/java/multithreading.xml/DontCallThreadRun" />
<rule ref="category/java/multithreading.xml/DoubleCheckedLocking" />
2024-06-06 04:12:26 +02:00
<rule ref="category/java/multithreading.xml/UnsynchronizedStaticFormatter" />
<rule ref="category/java/performance.xml/AvoidArrayLoops" />
<rule ref="category/java/performance.xml/BigIntegerInstantiation" />
<rule ref="category/java/performance.xml/ConsecutiveAppendsShouldReuse" />
<rule ref="category/java/performance.xml/InefficientEmptyStringCheck" />
<rule ref="category/java/performance.xml/InefficientStringBuffering" />
<rule ref="category/java/performance.xml/OptimizableToArrayCall" />
<rule ref="category/java/performance.xml/StringInstantiation" />
<rule ref="category/java/performance.xml/StringToString" />
<rule ref="category/java/performance.xml/TooFewBranchesForASwitchStatement" />
<rule ref="category/java/performance.xml/UseArrayListInsteadOfVector" />
<rule ref="category/java/performance.xml/UseArraysAsList" />
<rule ref="category/java/performance.xml/UseIOStreamsWithApacheCommonsFileItem" />
<rule ref="category/java/performance.xml/UselessStringValueOf" />
<rule ref="category/java/performance.xml/UseStringBufferLength" />
<rule ref="category/java/security.xml/HardCodedCryptoKey" />
<rule ref="category/java/security.xml/InsecureCryptoIv" />
2024-06-03 14:02:30 +00:00
</ruleset>