We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2b77e35 commit 43b0e65Copy full SHA for 43b0e65
rules/error-reporting.xml
@@ -0,0 +1,10 @@
1
+<?xml version="1.0"?>
2
+<rule version="1">
3
+ <pattern>Severity :: fromString \( "\w+" \)</pattern>
4
+ <message>
5
+ <id>ConstantSeverityFromString</id>
6
+ <severity>style</severity>
7
+ <summary>Constant severity lookups should be done via
8
+Severity::constant.</summary>
9
+ </message>
10
+</rule>
rules/stl.xml
@@ -0,0 +1,11 @@
+<!-- This should ideally be checked by lib/checkstl.cpp -->
+ <pattern> \. find \( "[^"]+?" \) == \d+ </pattern>
+ <id>UselessSTDStringFind</id>
+ <severity>performance</severity>
+ <summary>When looking for a string at a fixed position compare
+is faster.</summary>
11
0 commit comments