Add rules for tokAt(0) and strAt(0), suggested by reif
This commit is contained in:
parent
bacb234534
commit
2b77e3591e
|
@ -16,3 +16,19 @@
|
|||
without special pattern requirements.</summary>
|
||||
</message>
|
||||
</rule>
|
||||
<rule version="1">
|
||||
<pattern>\b[\w_]+ \. tokAt \( 0 \)</pattern>
|
||||
<message>
|
||||
<id>TokentokAt0</id>
|
||||
<severity>error</severity>
|
||||
<summary>tok->tokAt(0) is a slow way to say tok.</summary>
|
||||
</message>
|
||||
</rule>
|
||||
<rule version="1">
|
||||
<pattern>\b[\w_]+ \. strAt \( 0 \)</pattern>
|
||||
<message>
|
||||
<id>TokenstrAt0</id>
|
||||
<severity>error</severity>
|
||||
<summary>tok->strAt(0) is a slow way to say tok->str()</summary>
|
||||
</message>
|
||||
</rule>
|
||||
|
|
Loading…
Reference in New Issue