|
| 1 | +<?xml version="1.0"?> |
| 2 | +<!-- |
| 3 | + Licensed to the Apache Software Foundation (ASF) under one or more |
| 4 | + contributor license agreements. See the NOTICE file distributed with |
| 5 | + this work for additional information regarding copyright ownership. |
| 6 | + The ASF licenses this file to You under the Apache License, Version 2.0 |
| 7 | + (the "License"); you may not use this file except in compliance with |
| 8 | + the License. You may obtain a copy of the License at |
| 9 | +
|
| 10 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +
|
| 12 | + Unless required by applicable law or agreed to in writing, software |
| 13 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | + See the License for the specific language governing permissions and |
| 16 | + limitations under the License. |
| 17 | +--> |
| 18 | +<ruleset name="commons-rng-customized" |
| 19 | + xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" |
| 20 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 21 | + xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd"> |
| 22 | + <description> |
| 23 | + This ruleset checks the code for discouraged programming constructs. |
| 24 | + </description> |
| 25 | + |
| 26 | + <!-- Default ruleset for maven-pmd-plugin --> |
| 27 | + <rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP"/> |
| 28 | + <rule ref="category/java/bestpractices.xml/CheckResultSet"/> |
| 29 | + <rule ref="category/java/bestpractices.xml/UnusedImports"/> |
| 30 | + <rule ref="category/java/bestpractices.xml/UnusedFormalParameter"/> |
| 31 | + <rule ref="category/java/bestpractices.xml/UnusedLocalVariable"/> |
| 32 | + <rule ref="category/java/bestpractices.xml/UnusedPrivateField"/> |
| 33 | + <rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"/> |
| 34 | + <rule ref="category/java/codestyle.xml/DontImportJavaLang"/> |
| 35 | + <rule ref="category/java/codestyle.xml/DuplicateImports"/> |
| 36 | + <rule ref="category/java/codestyle.xml/ExtendsObject"/> |
| 37 | + <rule ref="category/java/codestyle.xml/ForLoopShouldBeWhileLoop"/> |
| 38 | + <rule ref="category/java/codestyle.xml/TooManyStaticImports"/> |
| 39 | + <rule ref="category/java/codestyle.xml/UnnecessaryFullyQualifiedName"/> |
| 40 | + <rule ref="category/java/codestyle.xml/UnnecessaryModifier"/> |
| 41 | + <rule ref="category/java/codestyle.xml/UnnecessaryReturn"/> |
| 42 | + <rule ref="category/java/codestyle.xml/UselessParentheses"/> |
| 43 | + <rule ref="category/java/codestyle.xml/UselessQualifiedThis"/> |
| 44 | + <rule ref="category/java/design.xml/CollapsibleIfStatements"/> |
| 45 | + <rule ref="category/java/design.xml/SimplifiedTernary"/> |
| 46 | + <rule ref="category/java/design.xml/UselessOverridingMethod"/> |
| 47 | + <rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop"/> |
| 48 | + <rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor"/> |
| 49 | + <rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators"/> |
| 50 | + <rule ref="category/java/errorprone.xml/AvoidUsingOctalValues"/> |
| 51 | + <rule ref="category/java/errorprone.xml/BrokenNullCheck"/> |
| 52 | + <rule ref="category/java/errorprone.xml/CheckSkipResult"/> |
| 53 | + <rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray"/> |
| 54 | + <rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices"/> |
| 55 | + <rule ref="category/java/errorprone.xml/EmptyCatchBlock"/> |
| 56 | + <rule ref="category/java/errorprone.xml/EmptyFinallyBlock"/> |
| 57 | + <rule ref="category/java/errorprone.xml/EmptyIfStmt"/> |
| 58 | + <rule ref="category/java/errorprone.xml/EmptyInitializer"/> |
| 59 | + <rule ref="category/java/errorprone.xml/EmptyStatementBlock"/> |
| 60 | + <rule ref="category/java/errorprone.xml/EmptyStatementNotInLoop"/> |
| 61 | + <rule ref="category/java/errorprone.xml/EmptySwitchStatements"/> |
| 62 | + <rule ref="category/java/errorprone.xml/EmptySynchronizedBlock"/> |
| 63 | + <rule ref="category/java/errorprone.xml/EmptyTryBlock"/> |
| 64 | + <rule ref="category/java/errorprone.xml/EmptyWhileStmt"/> |
| 65 | + <rule ref="category/java/errorprone.xml/ImportFromSamePackage"/> |
| 66 | + <rule ref="category/java/errorprone.xml/JumbledIncrementer"/> |
| 67 | + <rule ref="category/java/errorprone.xml/MisplacedNullCheck"/> |
| 68 | + <rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode"/> |
| 69 | + <rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock"/> |
| 70 | + <rule ref="category/java/errorprone.xml/UnconditionalIfStatement"/> |
| 71 | + <rule ref="category/java/errorprone.xml/UnnecessaryConversionTemporary"/> |
| 72 | + <rule ref="category/java/errorprone.xml/UnusedNullCheckInEquals"/> |
| 73 | + <rule ref="category/java/errorprone.xml/UselessOperationOnImmutable"/> |
| 74 | + <rule ref="category/java/multithreading.xml/AvoidThreadGroup"/> |
| 75 | + <rule ref="category/java/multithreading.xml/DontCallThreadRun"/> |
| 76 | + <rule ref="category/java/multithreading.xml/DoubleCheckedLocking"/> |
| 77 | + <rule ref="category/java/performance.xml/BigIntegerInstantiation"/> |
| 78 | + <rule ref="category/java/performance.xml/BooleanInstantiation"/> |
| 79 | + |
| 80 | + <!-- Rule customisations. --> |
| 81 | + |
| 82 | + <rule ref="category/java/codestyle.xml/TooManyStaticImports"> |
| 83 | + <properties> |
| 84 | + <property name="violationSuppressXPath" |
| 85 | + value="//ClassOrInterfaceDeclaration[@Image='CSVFormat' or @Image='Lexer']"/> |
| 86 | + </properties> |
| 87 | + </rule> |
| 88 | + |
| 89 | +</ruleset> |
0 commit comments