diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-24 14:55:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-24 14:56:38 +0300 |
commit | f7190f06bdfc24415ace9dad391aed71aca8f914 (patch) | |
tree | 7e49be84f9b2375c2b56c784d3ab0a3dbdfd533d /src/rules | |
parent | ddb7f310fb31934c92f73da3ae0c4226f2689b76 (diff) | |
download | mplint-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.cpp | 19 |
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); } |