From 8057a5c0df1051ee6b00440650621765560db179 Mon Sep 17 00:00:00 2001 From: Romain PELISSE Date: Sat, 9 May 2015 00:44:40 +0200 Subject: [PATCH] Add a new rule 'InvalidDependencyType' to pom rulesets --- .../src/main/resources/rulesets/pom/basic.xml | 44 +++++++++++++++- .../pom/rule/basic/xml/InvalidDepencyType.xml | 51 +++++++++++++++++++ 2 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 pmd-xml/src/test/resources/net/sourceforge/pmd/lang/pom/rule/basic/xml/InvalidDepencyType.xml diff --git a/pmd-xml/src/main/resources/rulesets/pom/basic.xml b/pmd-xml/src/main/resources/rulesets/pom/basic.xml index 5b4295f22a..d08cdbff6c 100644 --- a/pmd-xml/src/main/resources/rulesets/pom/basic.xml +++ b/pmd-xml/src/main/resources/rulesets/pom/basic.xml @@ -42,4 +42,46 @@ ${project.version} in a BOM or parent POM. ]]> - + + + + + 3 + + + + + + + + + + + + ... + + ... + + org.jboss.arquillian + arquillian-bom + ${arquillian.version} + bom + import + + ... + + + ]]> + + + + diff --git a/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/pom/rule/basic/xml/InvalidDepencyType.xml b/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/pom/rule/basic/xml/InvalidDepencyType.xml new file mode 100644 index 0000000000..a0f93c8a7e --- /dev/null +++ b/pmd-xml/src/test/resources/net/sourceforge/pmd/lang/pom/rule/basic/xml/InvalidDepencyType.xml @@ -0,0 +1,51 @@ + + + + Simple POM file - no violation + 0 + + 4.0.0 + net.sourceforge.pmd + xml-pom + 1.0.0-SNAPSHOT + + + + org.jboss.arquillian + arquillian-bom + ${arquillian.version} + pom + import + + + + + ]]> + xml + + + Simple POM file with violation + 1 + + 4.0.0 + net.sourceforge.pmd + xml-pom + 1.0.0-SNAPSHOT + + + + org.jboss.arquillian + arquillian-bom + ${arquillian.version} + bom + import + + + + + ]]> + xml + +