summaryrefslogtreecommitdiff
path: root/src/rules
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-24 14:55:48 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-24 14:56:38 +0300
commitf7190f06bdfc24415ace9dad391aed71aca8f914 (patch)
tree7e49be84f9b2375c2b56c784d3ab0a3dbdfd533d /src/rules
parentddb7f310fb31934c92f73da3ae0c4226f2689b76 (diff)
downloadmplint-f7190f06bdfc24415ace9dad391aed71aca8f914.tar.gz
mplint-f7190f06bdfc24415ace9dad391aed71aca8f914.tar.bz2
mplint-f7190f06bdfc24415ace9dad391aed71aca8f914.tar.xz
mplint-f7190f06bdfc24415ace9dad391aed71aca8f914.zip
Add macro for fast creating rule with single mask.
Diffstat (limited to 'src/rules')
-rw-r--r--src/rules/dump.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/rules/dump.cpp b/src/rules/dump.cpp
index 87c1aff..b4cec48 100644
--- a/src/rules/dump.cpp
+++ b/src/rules/dump.cpp
@@ -20,21 +20,26 @@
#include "template.hpp"
-registerRule(dump)
+registerRuleExt(dumpCpp, "(.+)[.]cpp")
-constructRule(dump)
+initRule(dumpCpp)
{
- addMask("(.+)[.]cpp");
- addMask("(.+)[.]h");
- deleteSelf();
+ printRaw("Checking file: " + file);
+}
+
+parseLineRule(dumpCpp)
+{
+ print(data);
}
-initRule(dump)
+registerRuleExt(dumpH, "(.+)[.]h")
+
+initRule(dumpH)
{
printRaw("Checking file: " + file);
}
-parseLineRule(dump)
+parseLineRule(dumpH)
{
print(data);
}