Add Multithreading and Performance rules

This commit is contained in:
Paul Campbell 2018-02-20 18:17:47 +00:00
parent ed5d941a43
commit a6bcc71db0

View file

@ -1,6 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<ruleset name="Custom Rules" <ruleset name="kemitix-pmd-ruleset-java"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd
@ -311,4 +311,48 @@ http://pmd.sourceforge.net/ruleset/2.0.0 ">
<rule ref="category/java/errorprone.xml/UseLocaleWithCaseConversions" /> <rule ref="category/java/errorprone.xml/UseLocaleWithCaseConversions" />
<rule ref="category/java/errorprone.xml/UseProperClassLoader" /> <rule ref="category/java/errorprone.xml/UseProperClassLoader" />
<!-- Multithreading -->
<rule ref="category/java/multithreading.xml/AvoidSynchronizedAtMethodLevel" />
<rule ref="category/java/multithreading.xml/AvoidThreadGroup" />
<rule ref="category/java/multithreading.xml/AvoidUsingVolatile" />
<rule ref="category/java/multithreading.xml/DoNotUseThreads" />
<rule ref="category/java/multithreading.xml/DontCallThreadRun" />
<rule ref="category/java/multithreading.xml/DoubleCheckedLocking" />
<rule ref="category/java/multithreading.xml/NonThreadSafeSingleton" />
<rule ref="category/java/multithreading.xml/UnsynchronizedStaticDateFormatter" />
<rule ref="category/java/multithreading.xml/UseConcurrentHashMap" />
<rule ref="category/java/multithreading.xml/UseNotifyAllInsteadOfNotify" />
<!-- Performance -->
<rule ref="category/java/performance.xml/AddEmptyString" />
<rule ref="category/java/performance.xml/AppendCharacterWithChar" />
<rule ref="category/java/performance.xml/AvoidArrayLoops" />
<rule ref="category/java/performance.xml/AvoidFileStream" />
<rule ref="category/java/performance.xml/AvoidInstantiatingObjectsInLoops" />
<rule ref="category/java/performance.xml/AvoidUsingShortType" />
<rule ref="category/java/performance.xml/BigIntegerInstantiation" />
<rule ref="category/java/performance.xml/BooleanInstantiation" />
<rule ref="category/java/performance.xml/ByteInstantiation" />
<rule ref="category/java/performance.xml/ConsecutiveAppendsShouldReuse" />
<rule ref="category/java/performance.xml/ConsecutiveLiteralAppends" />
<rule ref="category/java/performance.xml/InefficientEmptyStringCheck" />
<rule ref="category/java/performance.xml/InefficientStringBuffering" />
<rule ref="category/java/performance.xml/InsufficientStringBufferDeclaration" />
<rule ref="category/java/performance.xml/IntegerInstantiation" />
<rule ref="category/java/performance.xml/LongInstantiation" />
<rule ref="category/java/performance.xml/OptimizableToArrayCall" />
<rule ref="category/java/performance.xml/RedundantFieldInitializer" />
<rule ref="category/java/performance.xml/ShortInstantiation" />
<rule ref="category/java/performance.xml/SimplifyStartsWith" />
<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/UnnecessaryWrapperObjectCreation" />
<rule ref="category/java/performance.xml/UseArrayListInsteadOfVector" />
<rule ref="category/java/performance.xml/UseArraysAsList" />
<rule ref="category/java/performance.xml/UseIndexOfChar" />
<rule ref="category/java/performance.xml/UselessStringValueOf" />
<rule ref="category/java/performance.xml/UseStringBufferForStringAppends" />
<rule ref="category/java/performance.xml/UseStringBufferLength" />
</ruleset> </ruleset>