This is an automated email from the ASF dual-hosted git repository. adangel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-pmd-plugin.git
commit c0cff37cc6cdab4faef654746e21cad25fcc9f33 Author: Andreas Dangel <adan...@apache.org> AuthorDate: Fri Dec 15 19:53:36 2017 +0100 [MPMD-247] Upgrade to PMD 6.0.0 Upgrade /rulesets/maven.xml --- src/main/resources/rulesets/maven.xml | 94 ++++++++++++++++++++++++++--------- 1 file changed, 71 insertions(+), 23 deletions(-) diff --git a/src/main/resources/rulesets/maven.xml b/src/main/resources/rulesets/maven.xml index 1a5ee2d..c7918f6 100644 --- a/src/main/resources/rulesets/maven.xml +++ b/src/main/resources/rulesets/maven.xml @@ -18,34 +18,82 @@ specific language governing permissions and limitations under the License. --> <ruleset name="Maven Ruleset" - xmlns="http://pmd.sf.net/ruleset/1.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" - xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> + 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 http://pmd.sourceforge.net/ruleset_2_0_0.xsd"> - <!-- - Customized PMD ruleset for Maven, see [0] for more information - [0] https://pmd.github.io/latest/customizing/howtomakearuleset.html - --> + <!-- + Customized PMD ruleset for Maven, see [0] for more information. + This ruleset is references by org.apache.maven:maven-parent. - <description> - This ruleset checks the code for discouraged programming constructs. - </description> + [0] https://pmd.github.io/latest/pmd_userdocs_understanding_rulesets.html + --> - <rule ref="rulesets/java/basic.xml"/> + <description> + This ruleset checks the code for discouraged programming constructs. + </description> - <rule ref="rulesets/java/empty.xml"> - <exclude name="EmptyCatchBlock"/> - </rule> - <rule ref="rulesets/java/empty.xml/EmptyCatchBlock"> - <properties> - <property name="allowCommentedBlocks" value="true"/> - </properties> - </rule> + <rule ref="category/java/bestpractices.xml/AvoidUsingHardCodedIP" /> + <rule ref="category/java/bestpractices.xml/CheckResultSet" /> + <rule ref="category/java/bestpractices.xml/UnusedFormalParameter" /> + <rule ref="category/java/bestpractices.xml/UnusedLocalVariable" /> + <rule ref="category/java/bestpractices.xml/UnusedPrivateField" /> + <rule ref="category/java/bestpractices.xml/UnusedPrivateMethod" /> + <rule ref="category/java/bestpractices.xml/UnusedImports" /> - <rule ref="rulesets/java/unnecessary.xml"/> + <rule ref="category/java/codestyle.xml/DontImportJavaLang" /> + <rule ref="category/java/codestyle.xml/DuplicateImports" /> + <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/UnnecessaryModifier" /> + <rule ref="category/java/codestyle.xml/UnnecessaryReturn" /> + <rule ref="category/java/codestyle.xml/UselessParentheses" /> + <rule ref="category/java/codestyle.xml/UselessQualifiedThis" /> - <rule ref="rulesets/java/unusedcode.xml"/> + <rule ref="category/java/design.xml/CollapsibleIfStatements" /> + <rule ref="category/java/design.xml/SimplifiedTernary" /> + <rule ref="category/java/design.xml/UselessOverridingMethod" /> + + <rule ref="category/java/errorprone.xml/AvoidBranchingStatementAsLastInLoop" /> + <rule ref="category/java/errorprone.xml/AvoidDecimalLiteralsInBigDecimalConstructor" /> + <rule ref="category/java/errorprone.xml/AvoidMultipleUnaryOperators" /> + <rule ref="category/java/errorprone.xml/AvoidUsingOctalValues" /> + <rule ref="category/java/errorprone.xml/BrokenNullCheck" /> + <rule ref="category/java/errorprone.xml/CheckSkipResult" /> + <rule ref="category/java/errorprone.xml/ClassCastExceptionWithToArray" /> + <rule ref="category/java/errorprone.xml/DontUseFloatTypeForLoopIndices" /> + <rule ref="category/java/errorprone.xml/EmptyCatchBlock"> + <properties> + <property name="allowCommentedBlocks" value="true"/> + </properties> + </rule> + <rule ref="category/java/errorprone.xml/EmptyFinallyBlock" /> + <rule ref="category/java/errorprone.xml/EmptyIfStmt" /> + <rule ref="category/java/errorprone.xml/EmptyInitializer" /> + <rule ref="category/java/errorprone.xml/EmptyStatementBlock" /> + <rule ref="category/java/errorprone.xml/EmptyStatementNotInLoop" /> + <rule ref="category/java/errorprone.xml/EmptyStaticInitializer" /> + <rule ref="category/java/errorprone.xml/EmptySwitchStatements" /> + <rule ref="category/java/errorprone.xml/EmptySynchronizedBlock" /> + <rule ref="category/java/errorprone.xml/EmptyTryBlock" /> + <rule ref="category/java/errorprone.xml/EmptyWhileStmt" /> + <rule ref="category/java/errorprone.xml/ImportFromSamePackage" /> + <rule ref="category/java/errorprone.xml/JumbledIncrementer" /> + <rule ref="category/java/errorprone.xml/MisplacedNullCheck" /> + <rule ref="category/java/errorprone.xml/OverrideBothEqualsAndHashcode" /> + <rule ref="category/java/errorprone.xml/ReturnFromFinallyBlock" /> + <rule ref="category/java/errorprone.xml/UnconditionalIfStatement" /> + <rule ref="category/java/errorprone.xml/UnnecessaryConversionTemporary" /> + <rule ref="category/java/errorprone.xml/UnusedNullCheckInEquals" /> + <rule ref="category/java/errorprone.xml/UselessOperationOnImmutable" /> + + <rule ref="category/java/multithreading.xml/AvoidThreadGroup" /> + <rule ref="category/java/multithreading.xml/DontCallThreadRun" /> + <rule ref="category/java/multithreading.xml/DoubleCheckedLocking" /> + + <rule ref="category/java/performance.xml/BigIntegerInstantiation" /> + <rule ref="category/java/performance.xml/BooleanInstantiation" /> - <rule ref="rulesets/java/imports.xml"/> </ruleset> -- To stop receiving notification emails like this one, please contact "commits@maven.apache.org" <commits@maven.apache.org>.