[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> </description>
<rule name="ProjectVersionAsDependencyVersion" <rule name="ProjectVersionAsDependencyVersion"
language="xml" language="pom"
since="5.4" since="5.4"
message="Do not use project's version to express a dependency's version." message="Do not use project's version to express a dependency's version."
class="net.sourceforge.pmd.lang.rule.XPathRule" 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> <description>
<![CDATA[ Using that expression in dependency declarations seems like a shortcut, but it can go wrong.
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 By far the most common problem is the use of ${project.version} in a BOM or parent POM.
${project.version} in a BOM or parent POM.
]]>
</description> </description>
<priority>3</priority> <priority>3</priority>
<properties> <properties>
@ -44,13 +42,14 @@ ${project.version} in a BOM or parent POM.
</rule> </rule>
<rule name="InvalidDependencyTypes" <rule name="InvalidDependencyTypes"
language="xml" language="pom"
since="5.4" since="5.4"
message="By default, Maven only recognized the following types: $validTypes." message="By default, Maven only recognized the following types: $validTypes."
class="net.sourceforge.pmd.lang.rule.XPathRule" class="net.sourceforge.pmd.lang.rule.XPathRule"
externalInfoUrl="${pmd.website.baseurl}/rules/pom/basic.html#InvalidDependencyTypes"> externalInfoUrl="${pmd.website.baseurl}/pmd_rules_pom_basic.html#invaliddependencytypes">
<description><![CDATA[ <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. ]]> 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> </description>
<priority>3</priority> <priority>3</priority>
<properties> <properties>

View File

@ -13,7 +13,7 @@ The Basic XML Ruleset contains a collection of good practices which everyone sho
since="5.0" since="5.0"
message="Potentialy mistyped CDATA section with extra [ at beginning or ] at the end." message="Potentialy mistyped CDATA section with extra [ at beginning or ] at the end."
class="net.sourceforge.pmd.lang.rule.XPathRule" 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> <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 ]. 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> </description>
@ -33,4 +33,5 @@ An extra [ looks like &lt;!CDATA[[]]&gt;, and an extra ] looks like &lt;!CDATA[]
]]> ]]>
</example> </example>
</rule> </rule>
</ruleset> </ruleset>

View File

@ -13,20 +13,21 @@ This ruleset regroups a collection of good practices regarding XPath querying an
since="5.0" since="5.0"
message="The xpath concat() function accepts as many arguments as required, you may be able to factorize this expression" 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" 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> <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> </description>
<priority>3</priority> <priority>3</priority>
<properties> <properties>
<property name="xpath"> <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> <value>
<![CDATA[ <![CDATA[
//node()[contains(substring-after(@select,'concat'),'concat')] //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> </value>
</property> </property>
</properties> </properties>
@ -37,18 +38,25 @@ The XPath concat() functions accepts as many arguments as required so you can ha
]]> ]]>
</example> </example>
</rule> </rule>
<rule name="AvoidAxisNavigation" <rule name="AvoidAxisNavigation"
language="xsl" language="xsl"
since="5.0" since="5.0"
message="Axis navigation has the largest impact when writing an XPath query." message="Axis navigation has the largest impact when writing an XPath query."
class="net.sourceforge.pmd.lang.rule.XPathRule" 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> <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> </description>
<priority>3</priority> <priority>3</priority>
<properties> <properties>
<property name="xpath"> <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> <value>
<![CDATA[ <![CDATA[
//node()[ //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> </value>
</property> </property>
<property name="checkSelfDescendantAbreviation" type="Boolean" description="descendant::self abreviation, '//', will also trigger this rule." value="false"/> <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> </example>
</rule> </rule>
</ruleset> </ruleset>