diff --git a/pmd-xml/src/main/resources/rulesets/pom/basic.xml b/pmd-xml/src/main/resources/rulesets/pom/basic.xml index 974e6970f7..2a56620ebd 100644 --- a/pmd-xml/src/main/resources/rulesets/pom/basic.xml +++ b/pmd-xml/src/main/resources/rulesets/pom/basic.xml @@ -8,30 +8,28 @@ The Basic POM Ruleset contains a collection of good practices regarding Maven's POM files. - - - - - 3 - - - - + +Using that expression in dependency declarations seems like a shortcut, but it can go wrong. +By far the most common problem is the use of ${project.version} in a BOM or parent POM. + + 3 + + + + - - - - - + + + + ... @@ -39,33 +37,34 @@ ${project.version} in a BOM or parent POM. ${project.dependency} - ]]> - - +]]> + + - - - 3 - - - + externalInfoUrl="${pmd.website.baseurl}/pmd_rules_pom_basic.html#invaliddependencytypes"> + +While Maven will not failed if you use an invalid type for a dependency in the +dependency management section, it will not also uses the dependency. + + 3 + + + - - - - - - - + + + + + + ... @@ -81,7 +80,7 @@ While Maven will not failed if you use an invalid type for a dependency in the d ]]> - - + + - + diff --git a/pmd-xml/src/main/resources/rulesets/xml/basic.xml b/pmd-xml/src/main/resources/rulesets/xml/basic.xml index 1d6ac62356..f847520c7c 100644 --- a/pmd-xml/src/main/resources/rulesets/xml/basic.xml +++ b/pmd-xml/src/main/resources/rulesets/xml/basic.xml @@ -8,29 +8,30 @@ The Basic XML Ruleset contains a collection of good practices which everyone should follow. - - + + An XML CDATA section begins with a <!CDATA[ marker, which has only one [, and ends with a ]]> marker, which has only two ]. - - 3 - - - - + 3 + + + + - - - - - + + + + - - - \ No newline at end of file +]]> + + + + diff --git a/pmd-xml/src/main/resources/rulesets/xsl/xpath.xml b/pmd-xml/src/main/resources/rulesets/xsl/xpath.xml index 98dc7f12fb..c075ceb4e2 100644 --- a/pmd-xml/src/main/resources/rulesets/xsl/xpath.xml +++ b/pmd-xml/src/main/resources/rulesets/xsl/xpath.xml @@ -8,49 +8,57 @@ This ruleset regroups a collection of good practices regarding XPath querying and functions inside an XSL. - - -The XPath concat() functions accepts as many arguments as required so you can have "concat($a,'b',$c)" rather than "concat($a,concat('b',$c)". - - 3 - - - - + + +The XPath concat() functions accepts as many arguments as required so you can have +"concat($a,'b',$c)" rather than "concat($a,concat('b',$c)". + + 3 + + - - - - - - - ]]> - - - - -Avoid using the 'following' or 'preceeding' axes whenever possible, as these can cut through 100% of the document in the worst case. Also, try to avoid using 'descendant' or 'descendant-self' axes, as if you're at the top of the Document, it necessarily means cutting through 100% of the document. - - 3 - - - - + + + + + + + +]]> + + + + + +Avoid using the 'following' or 'preceeding' axes whenever possible, as these can cut +through 100% of the document in the worst case. Also, try to avoid using 'descendant' +or 'descendant-self' axes, as if you're at the top of the Document, it necessarily means +cutting through 100% of the document. + + 3 + + + + + - - - - - - - - ]]> - - + + + + + + +]]> + + +