summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-24 16:14:49 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-24 16:14:49 +0300
commitaa3e0813f3948d9da71b3d354b8545f0b3108c30 (patch)
tree4691283035557a056acded43cc9630e74bae14be
parentdeb643a6371a403f71e16c6b9011038ca99eb74a (diff)
downloadmplint-aa3e0813f3948d9da71b3d354b8545f0b3108c30.tar.gz
mplint-aa3e0813f3948d9da71b3d354b8545f0b3108c30.tar.bz2
mplint-aa3e0813f3948d9da71b3d354b8545f0b3108c30.tar.xz
mplint-aa3e0813f3948d9da71b3d354b8545f0b3108c30.zip
Add manual rule names.
-rw-r--r--src/rules/debug.cpp4
-rw-r--r--src/rules/dump.cpp4
-rw-r--r--src/template.hpp26
3 files changed, 17 insertions, 17 deletions
diff --git a/src/rules/debug.cpp b/src/rules/debug.cpp
index 7edae01..e2279bf 100644
--- a/src/rules/debug.cpp
+++ b/src/rules/debug.cpp
@@ -20,7 +20,7 @@
#include "template.hpp"
-registerRuleExt(debugH, "(.+)[.]h")
+registerRuleExt(debugH, "003", "(.+)[.]h")
startRule(debugH)
{
@@ -41,7 +41,7 @@ parseLineRule(debugH)
}
-registerRuleExt(debugCpp, "(.+)[.]cpp")
+registerRuleExt(debugCpp, "004", "(.+)[.]cpp")
startRule(debugCpp)
{
diff --git a/src/rules/dump.cpp b/src/rules/dump.cpp
index f074f41..a01aefe 100644
--- a/src/rules/dump.cpp
+++ b/src/rules/dump.cpp
@@ -21,7 +21,7 @@
#include "template.hpp"
/*
-registerRuleExt(dumpCpp, "(.+)[.]cpp")
+registerRuleExt(dumpCpp, "001", "(.+)[.]cpp")
startRule(dumpCpp)
{
@@ -39,7 +39,7 @@ parseLineRule(dumpCpp)
}
-registerRuleExt(dumpH, "(.+)[.]h")
+registerRuleExt(dumpH, "002", "(.+)[.]h")
startRule(dumpH)
{
diff --git a/src/template.hpp b/src/template.hpp
index 0002a35..3acfb86 100644
--- a/src/template.hpp
+++ b/src/template.hpp
@@ -23,11 +23,11 @@
#include "localconsts.h"
-#define registerRule(name) \
-class name : public RuleBase \
+#define registerRule(rule) \
+class rule : public RuleBase \
{ \
public: \
- name(); \
+ rule(); \
\
void start(); \
\
@@ -38,16 +38,16 @@ class name : public RuleBase \
\
namespace \
{ \
- name instance##name; \
+ rule instance##rule; \
} \
-#define registerRuleExt(name, ext) \
-class name : public RuleBase \
+#define registerRuleExt(rule, name, ext) \
+class rule : public RuleBase \
{ \
public: \
- name() \
+ rule() \
{ \
- setName(#name); \
+ setName(name); \
addMask(ext); \
} \
\
@@ -60,11 +60,11 @@ class name : public RuleBase \
\
namespace \
{ \
- name instance##name; \
+ rule instance##rule; \
} \
-#define constructRule(name) name::name()
-#define startRule(name) void name::start()
-#define endRule(name) void name::end()
-#define parseLineRule(name) void name::parseLine(std::string data)
+#define constructRule(rule) rule::rule()
+#define startRule(rule) void rule::start()
+#define endRule(rule) void rule::end()
+#define parseLineRule(rule) void rule::parseLine(std::string data)