Fix xml syntax in token-matching.xml (#2197)
The file token-matching.xml contains multiple rules - Add <rules></rules> xml tags - Fixes the following xmllint error: ./rules/token-matching.xml:10: parser error : Extra content at the end of the document <rule version="1"> ^
This commit is contained in:
parent
16f1d8196b
commit
52aab1e80c
|
@ -1,34 +1,36 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<rule version="1">
|
<rules>
|
||||||
<pattern>Token :: (?:findm|(?:simple|)M)atch \([^,]+,\s+"(?:\s+|[^"]+?\s+")</pattern>
|
<rule version="1">
|
||||||
<message>
|
<pattern>Token :: (?:findm|(?:simple|)M)atch \([^,]+,\s+"(?:\s+|[^"]+?\s+")</pattern>
|
||||||
<id>TokenMatchSpacing</id>
|
<message>
|
||||||
<severity>style</severity>
|
<id>TokenMatchSpacing</id>
|
||||||
<summary>Useless extra spacing for Token::*Match.</summary>
|
<severity>style</severity>
|
||||||
</message>
|
<summary>Useless extra spacing for Token::*Match.</summary>
|
||||||
</rule>
|
</message>
|
||||||
<rule version="1">
|
</rule>
|
||||||
<pattern>(?U)Token :: Match \([^,]+,\s+"[^%|!\[\]]+"</pattern>
|
<rule version="1">
|
||||||
<message>
|
<pattern>(?U)Token :: Match \([^,]+,\s+"[^%|!\[\]]+"</pattern>
|
||||||
<id>UseTokensimpleMatch</id>
|
<message>
|
||||||
<severity>error</severity>
|
<id>UseTokensimpleMatch</id>
|
||||||
<summary>Token::simpleMatch should be used to match tokens
|
<severity>error</severity>
|
||||||
|
<summary>Token::simpleMatch should be used to match tokens
|
||||||
without special pattern requirements.</summary>
|
without special pattern requirements.</summary>
|
||||||
</message>
|
</message>
|
||||||
</rule>
|
</rule>
|
||||||
<rule version="1">
|
<rule version="1">
|
||||||
<pattern>\b[\w_]+ \. tokAt \( 0 \)</pattern>
|
<pattern>\b[\w_]+ \. tokAt \( 0 \)</pattern>
|
||||||
<message>
|
<message>
|
||||||
<id>TokentokAt0</id>
|
<id>TokentokAt0</id>
|
||||||
<severity>error</severity>
|
<severity>error</severity>
|
||||||
<summary>tok->tokAt(0) is a slow way to say tok.</summary>
|
<summary>tok->tokAt(0) is a slow way to say tok.</summary>
|
||||||
</message>
|
</message>
|
||||||
</rule>
|
</rule>
|
||||||
<rule version="1">
|
<rule version="1">
|
||||||
<pattern>\b[\w_]+ \. strAt \( 0 \)</pattern>
|
<pattern>\b[\w_]+ \. strAt \( 0 \)</pattern>
|
||||||
<message>
|
<message>
|
||||||
<id>TokenstrAt0</id>
|
<id>TokenstrAt0</id>
|
||||||
<severity>error</severity>
|
<severity>error</severity>
|
||||||
<summary>tok->strAt(0) is a slow way to say tok->str()</summary>
|
<summary>tok->strAt(0) is a slow way to say tok->str()</summary>
|
||||||
</message>
|
</message>
|
||||||
</rule>
|
</rule>
|
||||||
|
</rules>
|
||||||
|
|
Loading…
Reference in New Issue