[xml] MissingEncoding - fix rule metadata

This commit is contained in:
Andreas Dangel
2023-10-19 10:24:45 +02:00
parent e92de6c1da
commit 7fc50e434c
2 changed files with 14 additions and 12 deletions

View File

@@ -10,18 +10,20 @@ Rules which enforce generally accepted best practices.
</description>
<rule name="MissingEncoding"
language="xml"
message="Set an explicit XML encoding in the XML declaration to ensure proper parsing"
class="net.sourceforge.pmd.lang.rule.XPathRule">
language="xml"
since="7.0.0"
message="Set an explicit XML encoding in the XML declaration to ensure proper parsing"
class="net.sourceforge.pmd.lang.rule.XPathRule"
externalInfoUrl="${pmd.website.baseurl}/pmd_rules_xml_bestpractices.html#missingencoding">
<description>
When the character encoding is missing from the XML declaration,
the parser may produce garbled text.
This is completely dependent on how the parser is set up
and the content of the XML file, so it may be hard to reproduce.
Providing an explicit encoding ensures accurate and consistent
parsing.
When the character encoding is missing from the XML declaration,
the parser may produce garbled text.
This is completely dependent on how the parser is set up
and the content of the XML file, so it may be hard to reproduce.
Providing an explicit encoding ensures accurate and consistent
parsing.
</description>
<priority>3</priority>
<properties>

View File

@@ -3,12 +3,12 @@
#
rulesets.filenames=\
category/xml/bestpractices.xml,\
category/xml/errorprone.xml
#
# categories without rules
#
# category/xml/bestpractices.xml
# category/xml/codestyle.xml
# category/xml/design.xml
# category/xml/documentation.xml