|
2 | 2 | <ruleset name="Default" |
3 | 3 | xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" |
4 | 4 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
5 | | - xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd"> |
| 5 | + xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.github.io/ruleset_2_0_0.xsd"> |
6 | 6 |
|
7 | 7 | <description> |
8 | 8 | This ruleset checks the code for discouraged programming constructs. |
9 | 9 | </description> |
10 | 10 |
|
11 | 11 | <!-- Only rules that don't overlap with CheckStyle! --> |
12 | 12 |
|
| 13 | + <!-- About: Formatting --> |
| 14 | + <!-- Some lines (e.g. description, examples and CDATA) have to start without any indents or this will result in incorrect formatting --> |
| 15 | + |
13 | 16 | <rule ref="category/java/bestpractices.xml/AvoidPrintStackTrace"/> |
14 | | - <rule ref="category/java/bestpractices.xml/AvoidStringBufferField"/> |
15 | 17 | <rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/> |
16 | 18 | <rule ref="category/java/bestpractices.xml/ConstantsInInterface"/> |
17 | 19 | <rule ref="category/java/bestpractices.xml/ExhaustiveSwitchHasDefault"/> |
| 20 | + <rule ref="category/java/bestpractices.xml/LabeledStatement"/> |
18 | 21 | <rule ref="category/java/bestpractices.xml/LiteralsFirstInComparisons"/> |
19 | 22 | <!-- CheckStyle can't handle this switch behavior -> delegated to PMD --> |
20 | 23 | <rule ref="category/java/bestpractices.xml/NonExhaustiveSwitch"/> |
|
26 | 29 | <rule ref="category/java/bestpractices.xml/PreserveStackTrace"/> |
27 | 30 | <rule ref="category/java/bestpractices.xml/SimplifiableTestAssertion"/> |
28 | 31 | <rule ref="category/java/bestpractices.xml/SystemPrintln"/> |
| 32 | + <rule ref="category/java/bestpractices.xml/UnnecessaryWarningSuppression"/> |
29 | 33 | <rule ref="category/java/bestpractices.xml/UnusedAssignment"/> |
30 | 34 | <rule ref="category/java/bestpractices.xml/UnusedPrivateField"/> |
31 | 35 | <rule ref="category/java/bestpractices.xml/UseCollectionIsEmpty"/> |
|
144 | 148 | <rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/> |
145 | 149 | <rule ref="category/java/errorprone.xml/EqualsNull"/> |
146 | 150 | <rule ref="category/java/errorprone.xml/IdempotentOperations"/> |
| 151 | + <rule ref="category/java/errorprone.xml/IdenticalConditionalBranches"/> |
147 | 152 | <rule ref="category/java/errorprone.xml/ImplicitSwitchFallThrough"/> |
148 | 153 | <rule ref="category/java/errorprone.xml/InstantiationToGetClass"/> |
149 | 154 | <rule ref="category/java/errorprone.xml/InvalidLogMessageFormat"/> |
150 | 155 | <rule ref="category/java/errorprone.xml/JumbledIncrementer"/> |
151 | 156 | <rule ref="category/java/errorprone.xml/MisplacedNullCheck"/> |
152 | 157 | <rule ref="category/java/errorprone.xml/MoreThanOneLogger"/> |
153 | 158 | <rule ref="category/java/errorprone.xml/NonStaticInitializer"/> |
| 159 | + <rule ref="category/java/errorprone.xml/ReplaceJavaUtilCalendar"/> |
| 160 | + <rule ref="category/java/errorprone.xml/ReplaceJavaUtilDate"/> |
154 | 161 | <rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock"/> |
155 | 162 | <rule ref="category/java/errorprone.xml/SingletonClassReturningNewInstance"/> |
156 | 163 | <rule ref="category/java/errorprone.xml/UnconditionalIfStatement"/> |
|
183 | 190 | <!-- Handled by checkstyle --> |
184 | 191 | <exclude name="RedundantFieldInitializer"/> |
185 | 192 |
|
| 193 | + <!-- Not in use and resource intensive --> |
| 194 | + <exclude name="UseIOStreamsWithApacheCommonsFileItem"/> |
| 195 | + |
186 | 196 | <!-- Nowadays optimized by compiler; No code bloating needed --> |
187 | 197 | <exclude name="UseStringBufferForStringAppends"/> |
188 | 198 | </rule> |
|
0 commit comments