diff --git a/pmd-core/src/main/resources/rulesets/internal/dogfood.xml b/pmd-core/src/main/resources/rulesets/internal/dogfood.xml
index 38d11e206d..6c0db0f1bd 100644
--- a/pmd-core/src/main/resources/rulesets/internal/dogfood.xml
+++ b/pmd-core/src/main/resources/rulesets/internal/dogfood.xml
@@ -47,7 +47,6 @@
-
diff --git a/pmd-java/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java b/pmd-java/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java
index 91e57dbc1a..c8d01ac612 100644
--- a/pmd-java/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java
+++ b/pmd-java/src/test/java/net/sourceforge/pmd/RuleSetFactoryTest.java
@@ -3,6 +3,7 @@
*/
package net.sourceforge.pmd;
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import org.junit.Test;
@@ -29,4 +30,17 @@ public class RuleSetFactoryTest extends AbstractRuleSetFactoryTest {
Rule rule = ruleset.getRuleByName("UselessParentheses");
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);
+ }
}