diff --git a/rules/token-matching.xml b/rules/token-matching.xml index 457cafb77..d85ed9e8e 100644 --- a/rules/token-matching.xml +++ b/rules/token-matching.xml @@ -1,36 +1,41 @@ - - - Token :: (?:findm|(?:simple|)M)atch \([^,]+,\s+"(?:\s+|[^"]+?\s+") - - TokenMatchSpacing - style - Useless extra spacing for Token::*Match. - - - - (?U)Token :: Match \([^,]+,\s+"[^%|!\[\]]+" - - UseTokensimpleMatch - error - Token::simpleMatch should be used to match tokens -without special pattern requirements. - - - - \b[\w_]+ \. tokAt \( 0 \) - - TokentokAt0 - error - tok->tokAt(0) is a slow way to say tok. - - - - \b[\w_]+ \. strAt \( 0 \) - - TokenstrAt0 - error - tok->strAt(0) is a slow way to say tok->str() - - - + + Token :: (?:findm|(?:simple|)M)atch \([^,]+,\s+"(?:\s+|[^"]+?\s+") + + TokenMatchSpacing + style + Useless extra spacing for Token::*Match. + + + + (?U)Token :: Match \([^,]+,\s+"[^%|!\[\]]+" \) + + UseTokensimpleMatch + error + Token::simpleMatch should be used to match tokens without special pattern requirements. + + + + \b[\w_]+ \. tokAt \( 0 \) + + TokentokAt0 + error + tok->tokAt(0) is a slow way to say tok. + + + + \b[\w_]+ \. strAt \( 0 \) + + TokenstrAt0 + error + tok->strAt(0) is a slow way to say tok->str() + + + + + + TokenMatchVariable + error + Simplify 'Token :: Match ( expr , %var% ) && expr->variable()' to 'expr->variable()' + +