Merge branch 'wip-dogfood-test' into pmd/5.4.x
This commit is contained in:
@ -47,7 +47,6 @@
|
|||||||
<exclude name="AtLeastOneConstructor"/>
|
<exclude name="AtLeastOneConstructor"/>
|
||||||
<exclude name="CallSuperInConstructor"/>
|
<exclude name="CallSuperInConstructor"/>
|
||||||
<exclude name="DefaultPackage"/>
|
<exclude name="DefaultPackage"/>
|
||||||
<exclude name="BooleanInversion"/>
|
|
||||||
<exclude name="DataflowAnomalyAnalysis"/>
|
<exclude name="DataflowAnomalyAnalysis"/>
|
||||||
<exclude name="AvoidFinalLocalVariable"/>
|
<exclude name="AvoidFinalLocalVariable"/>
|
||||||
<exclude name="DataflowAnomalyAnalysis"/>
|
<exclude name="DataflowAnomalyAnalysis"/>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
package net.sourceforge.pmd;
|
package net.sourceforge.pmd;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
import static org.junit.Assert.assertNull;
|
import static org.junit.Assert.assertNull;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
@ -29,4 +30,17 @@ public class RuleSetFactoryTest extends AbstractRuleSetFactoryTest {
|
|||||||
Rule rule = ruleset.getRuleByName("UselessParentheses");
|
Rule rule = ruleset.getRuleByName("UselessParentheses");
|
||||||
assertNull(rule);
|
assertNull(rule);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Makes sure that the internal dogfood.xml ruleset is valid and doesn't reference any
|
||||||
|
* unknown rules.
|
||||||
|
* @throws RuleSetNotFoundException if dogfood couldn't be found at all
|
||||||
|
*/
|
||||||
|
@Test
|
||||||
|
public void testDogfoodRuleset() throws RuleSetNotFoundException {
|
||||||
|
RuleSetReferenceId ref = RuleSetReferenceId.parse("rulesets/internal/dogfood.xml").get(0);
|
||||||
|
RuleSetFactory ruleSetFactory = new RuleSetFactory();
|
||||||
|
RuleSet ruleset = ruleSetFactory.createRuleSet(ref);
|
||||||
|
assertNotNull(ruleset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user