SERG-Delft / jpacman

Pacman-inspired game, for teaching testing purposes. (>= v9.0.0)
5 stars 684 forks source link

PMD rules deprecated "category/java/bestpractices.xml" #35

Open dutt-sanjay opened 4 years ago

dutt-sanjay commented 4 years ago

I am importing the pmd-rules profile using QAPlug for Intellij. Whenever I import this file i am getting below message.

PMD Coding Rules deactivated: 298 PMD Coding Rules deprecated: 2

Additional Information: PMD Coding Rules deprecated category/java/bestpractices.xml category/java/bestpractices.xml/JUnitTestContainsTooManyAsserts

<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         name="Custom ruleset"
         xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
         xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">

    <description>
        Custom rules for checking JUnit test quality.
    </description>

<!--
    <rule ref="rulesets/java/basic.xml"/>
    <rule ref="rulesets/java/unusedcode.xml"/>
    <rule ref="rulesets/java/imports.xml"/>
    <rule ref="rulesets/java/strings.xml"/>
    <rule ref="rulesets/java/codesize.xml"/>
    <rule ref="rulesets/java/braces.xml"/>
    <rule ref="rulesets/java/clone.xml"/>
    <rule ref="rulesets/java/empty.xml"/>
    <rule ref="category/java/errorprone.xml">
        <exclude name="TestClassWithoutTestCases"/>
    </rule>
-->
    <rule ref="category/java/bestpractices.xml">
        <exclude name="JUnitAssertionsShouldIncludeMessage"/>
        <exclude name="JUnitTestContainsTooManyAsserts"/>
        <exclude name="JUnit4TestShouldUseAfterAnnotation" />
        <exclude name="JUnit4TestShouldUseBeforeAnnotation" />
        <exclude name="UseVarargs" />
        <exclude name="AccessorMethodGeneration" />
    </rule>
    <rule ref="category/java/bestpractices.xml/JUnitTestContainsTooManyAsserts">
        <properties>
            <property name="maximumAsserts" value="5" />
        </properties>
    </rule>
</ruleset>

It's just now when I analyze code it says no coding rules found for above rules as the ones which are there are deprecated. Can you guys please look into this and tell me If I am missing anything. Thanks!