summaryrefslogtreecommitdiff
path: root/src/rules/debug.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-24 15:53:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-24 15:53:52 +0300
commit8520c503041946148e499faf6a6b65b2afc670bf (patch)
tree342870ea2f00de996b90c3bd26bcbb003777076f /src/rules/debug.cpp
parentc20a4844817573be1de5f355d4890e93db386e54 (diff)
downloadmplint-8520c503041946148e499faf6a6b65b2afc670bf.tar.gz
mplint-8520c503041946148e499faf6a6b65b2afc670bf.tar.bz2
mplint-8520c503041946148e499faf6a6b65b2afc670bf.tar.xz
mplint-8520c503041946148e499faf6a6b65b2afc670bf.zip
Add second rule for checking #include "debug.h"
Diffstat (limited to 'src/rules/debug.cpp')
-rw-r--r--src/rules/debug.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/rules/debug.cpp b/src/rules/debug.cpp
index 880b60b..7edae01 100644
--- a/src/rules/debug.cpp
+++ b/src/rules/debug.cpp
@@ -39,3 +39,23 @@ parseLineRule(debugH)
"Probably need replace it to #include \"localconsts.h\"");
}
}
+
+
+registerRuleExt(debugCpp, "(.+)[.]cpp")
+
+startRule(debugCpp)
+{
+}
+
+endRule(debugCpp)
+{
+ print("Missing #include \"debug.h\". "
+ "It need for profiling and memory debugging.");
+}
+
+parseLineRule(debugCpp)
+{
+ trim(data);
+ if (data == "#include \"debug.h\"")
+ terminateRule();
+}