Merge pull request #4804 from adangel:issue-4309-xpath-cleanups

[core] XPath cleanups #4804
This commit is contained in:
Andreas Dangel
2024-02-09 16:21:24 +01:00
87 changed files with 918 additions and 655 deletions

View File

@@ -13,7 +13,7 @@ Rules which enforce generally accepted best practices.
language="html"
since="6.45.0"
message="Avoid inline styles"
class="net.sourceforge.pmd.lang.rule.XPathRule"
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule"
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_html_bestpractices.html#avoidinlinestyles">
<description>
Don't mix content and style. Use separate CSS-files for the style and introduce classes.
@@ -21,7 +21,6 @@ This helps to reuse common styles.
</description>
<priority>3</priority>
<properties>
<property name="version" value="2.0"/>
<property name="xpath">
<value>
<![CDATA[

View File

@@ -14,7 +14,7 @@ import net.sourceforge.pmd.lang.html.ast.ASTHtmlComment;
import net.sourceforge.pmd.lang.html.ast.ASTHtmlDocument;
import net.sourceforge.pmd.lang.html.ast.ASTHtmlTextNode;
import net.sourceforge.pmd.lang.html.ast.HtmlParsingHelper;
import net.sourceforge.pmd.lang.rule.XPathRule;
import net.sourceforge.pmd.lang.rule.xpath.XPathRule;
import net.sourceforge.pmd.lang.rule.xpath.XPathVersion;
import net.sourceforge.pmd.reporting.Report;
import net.sourceforge.pmd.reporting.RuleViolation;