Skip to content

Commit 98bcd4e

Browse files
committed
NIFI-14890 Updated the Maven PMD Maven plugin used by the nifi-api to use the same ruleset as Apache NIFI.
1 parent 1ae0912 commit 98bcd4e

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

pmd-ruleset.xml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
19+
-->
20+
<ruleset name="Maven PMD Plugin Ruleset"
21+
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
22+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">
24+
25+
<description>Default PMD Rules for Apache NiFi API</description>
26+
27+
<rule ref="category/java/bestpractices.xml/AvoidMessageDigestField" />
28+
<rule ref="category/java/bestpractices.xml/AvoidReassigningCatchVariables" />
29+
<rule ref="category/java/bestpractices.xml/DoubleBraceInitialization" />
30+
<rule ref="category/java/bestpractices.xml/ExhaustiveSwitchHasDefault" />
31+
<rule ref="category/java/bestpractices.xml/ForLoopCanBeForeach" />
32+
<rule ref="category/java/bestpractices.xml/LooseCoupling" />
33+
<rule ref="category/java/bestpractices.xml/MissingOverride" />
34+
<rule ref="category/java/bestpractices.xml/PrimitiveWrapperInstantiation" />
35+
<rule ref="category/java/bestpractices.xml/SimplifiableTestAssertion" />
36+
<rule ref="category/java/bestpractices.xml/UnusedPrivateField" />
37+
<rule ref="category/java/bestpractices.xml/UnnecessaryVarargsArrayCreation" />
38+
<rule ref="category/java/bestpractices.xml/UnusedLocalVariable" />
39+
<rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty" />
40+
<rule ref="category/java/bestpractices.xml/UseStandardCharsets" />
41+
42+
<rule ref="category/java/codestyle.xml/AvoidDollarSigns" />
43+
<rule ref="category/java/codestyle.xml/ExtendsObject" />
44+
<rule ref="category/java/codestyle.xml/IdenticalCatchBranches" />
45+
<rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop" />
46+
<rule ref="category/java/codestyle.xml/UnnecessaryConstructor" />
47+
<rule ref="category/java/codestyle.xml/UnnecessaryImport" />
48+
<rule ref="category/java/codestyle.xml/UnnecessaryModifier" />
49+
<rule ref="category/java/codestyle.xml/UnnecessarySemicolon" />
50+
<rule ref="category/java/codestyle.xml/UseDiamondOperator" />
51+
<rule ref="category/java/codestyle.xml/UseExplicitTypes" />
52+
53+
<rule ref="category/java/errorprone.xml/AvoidAssertAsIdentifier" />
54+
<rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor" />
55+
<rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators" />
56+
<rule ref="category/java/errorprone.xml/AvoidUsingOctalValues" />
57+
<rule ref="category/java/errorprone.xml/BrokenNullCheck" />
58+
<rule ref="category/java/errorprone.xml/CheckSkipResult" />
59+
<rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray" />
60+
<rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices" />
61+
<rule ref="category/java/errorprone.xml/EmptyCatchBlock" />
62+
<rule ref="category/java/errorprone.xml/ImplicitSwitchFallThrough" />
63+
<rule ref="category/java/errorprone.xml/JumbledIncrementer" />
64+
<rule ref="category/java/errorprone.xml/MisplacedNullCheck" />
65+
<rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock" />
66+
<rule ref="category/java/errorprone.xml/UnconditionalIfStatement" />
67+
<rule ref="category/java/errorprone.xml/UnnecessaryConversionTemporary" />
68+
<rule ref="category/java/errorprone.xml/UselessOperationOnImmutable" />
69+
70+
<rule ref="category/java/multithreading.xml/AvoidThreadGroup" />
71+
<rule ref="category/java/multithreading.xml/DontCallThreadRun" />
72+
<rule ref="category/java/multithreading.xml/DoubleCheckedLocking" />
73+
<rule ref="category/java/multithreading.xml/UnsynchronizedStaticFormatter" />
74+
75+
<rule ref="category/java/performance.xml/BigIntegerInstantiation" />
76+
<rule ref="category/java/performance.xml/InefficientEmptyStringCheck" />
77+
<rule ref="category/java/performance.xml/StringInstantiation" />
78+
<rule ref="category/java/performance.xml/StringToString" />
79+
<rule ref="category/java/performance.xml/TooFewBranchesForSwitch">
80+
<properties>
81+
<property name="minimumNumberCaseForASwitch" value="2" />
82+
</properties>
83+
</rule>
84+
<rule ref="category/java/performance.xml/UselessStringValueOf" />
85+
<rule ref="category/java/performance.xml/UseStringBufferForStringAppends" />
86+
</ruleset>

0 commit comments

Comments
 (0)