The checksum in analyzer info files will now depend on the suppressions
This commit is contained in:
parent
4e25da7b9d
commit
223a116f24
|
@ -233,17 +233,18 @@ unsigned int CppCheck::checkFile(const std::string& filename, const std::string
|
||||||
|
|
||||||
if (!mSettings.buildDir.empty()) {
|
if (!mSettings.buildDir.empty()) {
|
||||||
// Get toolinfo
|
// Get toolinfo
|
||||||
std::string toolinfo;
|
std::ostringstream toolinfo;
|
||||||
toolinfo += CPPCHECK_VERSION_STRING;
|
toolinfo << CPPCHECK_VERSION_STRING;
|
||||||
toolinfo += mSettings.isEnabled(Settings::WARNING) ? 'w' : ' ';
|
toolinfo << (mSettings.isEnabled(Settings::WARNING) ? 'w' : ' ');
|
||||||
toolinfo += mSettings.isEnabled(Settings::STYLE) ? 's' : ' ';
|
toolinfo << (mSettings.isEnabled(Settings::STYLE) ? 's' : ' ');
|
||||||
toolinfo += mSettings.isEnabled(Settings::PERFORMANCE) ? 'p' : ' ';
|
toolinfo << (mSettings.isEnabled(Settings::PERFORMANCE) ? 'p' : ' ');
|
||||||
toolinfo += mSettings.isEnabled(Settings::PORTABILITY) ? 'p' : ' ';
|
toolinfo << (mSettings.isEnabled(Settings::PORTABILITY) ? 'p' : ' ');
|
||||||
toolinfo += mSettings.isEnabled(Settings::INFORMATION) ? 'i' : ' ';
|
toolinfo << (mSettings.isEnabled(Settings::INFORMATION) ? 'i' : ' ');
|
||||||
toolinfo += mSettings.userDefines;
|
toolinfo << mSettings.userDefines;
|
||||||
|
mSettings.nomsg.dump(toolinfo);
|
||||||
|
|
||||||
// Calculate checksum so it can be compared with old checksum / future checksums
|
// Calculate checksum so it can be compared with old checksum / future checksums
|
||||||
const unsigned int checksum = preprocessor.calculateChecksum(tokens1, toolinfo);
|
const unsigned int checksum = preprocessor.calculateChecksum(tokens1, toolinfo.str());
|
||||||
std::list<ErrorLogger::ErrorMessage> errors;
|
std::list<ErrorLogger::ErrorMessage> errors;
|
||||||
if (!mAnalyzerInformation.analyzeFile(mSettings.buildDir, filename, cfgname, checksum, &errors)) {
|
if (!mAnalyzerInformation.analyzeFile(mSettings.buildDir, filename, cfgname, checksum, &errors)) {
|
||||||
while (!errors.empty()) {
|
while (!errors.empty()) {
|
||||||
|
|
Loading…
Reference in New Issue