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,13 +1,14 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<rule version="1">
|
<rules>
|
||||||
|
<rule version="1">
|
||||||
<pattern>Token :: (?:findm|(?:simple|)M)atch \([^,]+,\s+"(?:\s+|[^"]+?\s+")</pattern>
|
<pattern>Token :: (?:findm|(?:simple|)M)atch \([^,]+,\s+"(?:\s+|[^"]+?\s+")</pattern>
|
||||||
<message>
|
<message>
|
||||||
<id>TokenMatchSpacing</id>
|
<id>TokenMatchSpacing</id>
|
||||||
<severity>style</severity>
|
<severity>style</severity>
|
||||||
<summary>Useless extra spacing for Token::*Match.</summary>
|
<summary>Useless extra spacing for Token::*Match.</summary>
|
||||||
</message>
|
</message>
|
||||||
</rule>
|
</rule>
|
||||||
<rule version="1">
|
<rule version="1">
|
||||||
<pattern>(?U)Token :: Match \([^,]+,\s+"[^%|!\[\]]+"</pattern>
|
<pattern>(?U)Token :: Match \([^,]+,\s+"[^%|!\[\]]+"</pattern>
|
||||||
<message>
|
<message>
|
||||||
<id>UseTokensimpleMatch</id>
|
<id>UseTokensimpleMatch</id>
|
||||||
|
@ -15,20 +16,21 @@
|
||||||
<summary>Token::simpleMatch should be used to match tokens
|
<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