Move CheckStl::missingComparison to normal checks

This commit is contained in:
Daniel Marjamäki 2019-03-08 20:19:40 +01:00
parent 75ce67f4b8
commit 725abbfac3
2 changed files with 7 additions and 2 deletions

View File

@ -60,6 +60,7 @@ public:
} }
CheckStl checkStl(tokenizer, settings, errorLogger); CheckStl checkStl(tokenizer, settings, errorLogger);
checkStl.missingComparison();
checkStl.outOfBounds(); checkStl.outOfBounds();
checkStl.outOfBoundsIndexExpression(); checkStl.outOfBoundsIndexExpression();
} }
@ -88,7 +89,6 @@ public:
// Style check // Style check
checkStl.size(); checkStl.size();
checkStl.redundantCondition(); checkStl.redundantCondition();
checkStl.missingComparison();
checkStl.useStlAlgorithm(); checkStl.useStlAlgorithm();
} }

View File

@ -167,14 +167,19 @@ private:
settings.inconclusive = inconclusive; settings.inconclusive = inconclusive;
settings.standards.cpp = cppstandard; settings.standards.cpp = cppstandard;
// Tokenize.. // Tokenize..
Tokenizer tokenizer(&settings, this); Tokenizer tokenizer(&settings, this);
std::istringstream istr(code); std::istringstream istr(code);
CheckStl checkStl(&tokenizer, &settings, this);
tokenizer.tokenize(istr, "test.cpp"); tokenizer.tokenize(istr, "test.cpp");
checkStl.runChecks(&tokenizer, &settings, this);
tokenizer.simplifyTokenList2(); tokenizer.simplifyTokenList2();
// Check.. // Check..
CheckStl checkStl(&tokenizer, &settings, this);
checkStl.runSimplifiedChecks(&tokenizer, &settings, this); checkStl.runSimplifiedChecks(&tokenizer, &settings, this);
} }
void check(const std::string &code, const bool inconclusive=false) { void check(const std::string &code, const bool inconclusive=false) {