[doc] [xml] Adjust externalInfoUrl properties to new site - Part 11

Note: I also took the chance to fix tab damage
This commit is contained in:
Andreas Dangel
2017-08-15 11:20:16 +02:00
parent ceef1819e5
commit 819da2c3b4
3 changed files with 125 additions and 119 deletions

View File

@ -9,16 +9,14 @@ The Basic POM Ruleset contains a collection of good practices regarding Maven's
</description>
<rule name="ProjectVersionAsDependencyVersion"
language="xml"
language="pom"
since="5.4"
message="Do not use project's version to express a dependency's version."
class="net.sourceforge.pmd.lang.rule.XPathRule"
externalInfoUrl="${pmd.website.baseurl}/rules/pom/basic.html#ProjectVersionAsDependencyVersion">
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_pom_basic.html#projectversionasdependencyversion">
<description>
<![CDATA[
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.
]]>
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.
</description>
<priority>3</priority>
<properties>
@ -44,13 +42,14 @@ ${project.version} in a BOM or parent POM.
</rule>
<rule name="InvalidDependencyTypes"
language="xml"
language="pom"
since="5.4"
message="By default, Maven only recognized the following types: $validTypes."
class="net.sourceforge.pmd.lang.rule.XPathRule"
externalInfoUrl="${pmd.website.baseurl}/rules/pom/basic.html#InvalidDependencyTypes">
<description><![CDATA[
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. ]]>
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_pom_basic.html#invaliddependencytypes">
<description>
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.
</description>
<priority>3</priority>
<properties>

View File

@ -13,7 +13,7 @@ The Basic XML Ruleset contains a collection of good practices which everyone sho
since="5.0"
message="Potentialy mistyped CDATA section with extra [ at beginning or ] at the end."
class="net.sourceforge.pmd.lang.rule.XPathRule"
externalInfoUrl="${pmd.website.baseurl}/rules/xml/basic.html#MistypedCDATASection">
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_xml_basic.html#mistypedcdatasection">
<description>
An XML CDATA section begins with a &lt;!CDATA[ marker, which has only one [, and ends with a ]]&gt; marker, which has only two ].
</description>
@ -33,4 +33,5 @@ An extra [ looks like &lt;!CDATA[[]]&gt;, and an extra ] looks like &lt;!CDATA[]
]]>
</example>
</rule>
</ruleset>

View File

@ -13,20 +13,21 @@ This ruleset regroups a collection of good practices regarding XPath querying an
since="5.0"
message="The xpath concat() function accepts as many arguments as required, you may be able to factorize this expression"
class="net.sourceforge.pmd.lang.rule.XPathRule"
externalInfoUrl="${pmd.website.baseurl}/rules/xsl/xpath.html#UseConcatOnce">
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_xsl_xpath.html#useconcatonce">
<description>
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)".
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)".
</description>
<priority>3</priority>
<properties>
<property name="xpath">
<!-- the use of node() allow to target any node with an select attribute
but also workaround the ambiguity of having the xsl namespace in the
node name.-->
<value>
<![CDATA[
//node()[contains(substring-after(@select,'concat'),'concat')]
]]>
<!-- the use of node() allow to target any node with an select attribute
but also workaround the ambiguity of having the xsl namespace in the
node name.-->
</value>
</property>
</properties>
@ -37,18 +38,25 @@ The XPath concat() functions accepts as many arguments as required so you can ha
]]>
</example>
</rule>
<rule name="AvoidAxisNavigation"
language="xsl"
since="5.0"
message="Axis navigation has the largest impact when writing an XPath query."
class="net.sourceforge.pmd.lang.rule.XPathRule"
externalInfoUrl="${pmd.website.baseurl}/rules/xsl/xpath.html#AvoidAxisNavigation">
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_xsl_xpath.html#avoidaxisnavigation">
<description>
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.
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.
</description>
<priority>3</priority>
<properties>
<property name="xpath">
<!-- the use of node() allow to target any node with an select attribute
but also workaround the ambiguity of having the xsl namespace in the
node name.-->
<value>
<![CDATA[
//node()[
@ -66,9 +74,6 @@ Avoid using the 'following' or 'preceeding' axes whenever possible, as these can
)
]
]]>
<!-- the use of node() allow to target any node with an select attribute
but also workaround the ambiguity of having the xsl namespace in the
node name.-->
</value>
</property>
<property name="checkSelfDescendantAbreviation" type="Boolean" description="descendant::self abreviation, '//', will also trigger this rule." value="false"/>
@ -79,4 +84,5 @@ Avoid using the 'following' or 'preceeding' axes whenever possible, as these can
]]>
</example>
</rule>
</ruleset>