Move CheckStl::missingComparison to normal checks
This commit is contained in:
parent
75ce67f4b8
commit
725abbfac3
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue