From 43b0e655bbdc87f57f08d4228e44771d8340abef Mon Sep 17 00:00:00 2001 From: Raphael Geissert Date: Wed, 2 Feb 2011 20:08:03 -0600 Subject: [PATCH] Add a few more rules --- rules/error-reporting.xml | 10 ++++++++++ rules/stl.xml | 11 +++++++++++ 2 files changed, 21 insertions(+) create mode 100644 rules/error-reporting.xml create mode 100644 rules/stl.xml diff --git a/rules/error-reporting.xml b/rules/error-reporting.xml new file mode 100644 index 000000000..2813c9bba --- /dev/null +++ b/rules/error-reporting.xml @@ -0,0 +1,10 @@ + + + Severity :: fromString \( "\w+" \) + + ConstantSeverityFromString + style + Constant severity lookups should be done via +Severity::constant. + + diff --git a/rules/stl.xml b/rules/stl.xml new file mode 100644 index 000000000..e98d55831 --- /dev/null +++ b/rules/stl.xml @@ -0,0 +1,11 @@ + + + + \. find \( "[^"]+?" \) == \d+ + + UselessSTDStringFind + performance + When looking for a string at a fixed position compare +is faster. + +