diff options
-rw-r--r-- | src/lintmanager.cpp | 2 | ||||
-rw-r--r-- | src/rulebase.cpp | 4 | ||||
-rw-r--r-- | src/rules/license.cpp | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/lintmanager.cpp b/src/lintmanager.cpp index 97ee925..bba2926 100644 --- a/src/lintmanager.cpp +++ b/src/lintmanager.cpp @@ -114,7 +114,7 @@ void LintManager::applyRulesToFile() FOR_EACH (std::vector<RuleBase*>::iterator, it, mSelectedRules) { RuleBase *const rule = *it; - int line = 0; + int line = 1; FOR_EACH (std::vector<std::string>::const_iterator, itStr, mFileData) { const std::string &str = *itStr; diff --git a/src/rulebase.cpp b/src/rulebase.cpp index 9cbf8bb..8b34ffe 100644 --- a/src/rulebase.cpp +++ b/src/rulebase.cpp @@ -27,7 +27,7 @@ RuleBase::RuleBase() : file(), ruleName(), - line(-1), + line(0), flag(true) { lint.addRule(this); @@ -65,5 +65,5 @@ void RuleBase::terminateRule() void RuleBase::init() { flag = true; - line = 0; + line = 1; } diff --git a/src/rules/license.cpp b/src/rules/license.cpp index fe81816..0ec320e 100644 --- a/src/rules/license.cpp +++ b/src/rules/license.cpp @@ -46,19 +46,19 @@ endRule(license) parseLineRule(license) { - if (line == 0 && data != "/*") + if (line == 1 && data != "/*") { print("Should be license header"); terminateRule(); return; } - else if (line == 1 && data != " * The ManaPlus Client") + else if (line == 2 && data != " * The ManaPlus Client") { print("Should be 'The ManaPlus Client' in header"); terminateRule(); return; } - else if (line > 1) + else if (line > 2) { if (checkText) { |