Skip to content

Commit f7a30fc

Browse files
committed
Rename Verification => Bughunting
1 parent 103532b commit f7a30fc

12 files changed

Lines changed: 20 additions & 20 deletions

cli/cppcheckexecutor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@ void CppCheckExecutor::reportErr(const ErrorLogger::ErrorMessage &msg)
10911091
}
10921092
}
10931093

1094-
void CppCheckExecutor::reportVerification(const std::string &str)
1094+
void CppCheckExecutor::bughuntingReport(const std::string &str)
10951095
{
10961096
if (!mSettings || str.empty())
10971097
return;

cli/cppcheckexecutor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class CppCheckExecutor : public ErrorLogger {
8181
*/
8282
void reportInfo(const ErrorLogger::ErrorMessage &msg) OVERRIDE;
8383

84-
void reportVerification(const std::string &str) OVERRIDE;
84+
void bughuntingReport(const std::string &str) OVERRIDE;
8585

8686
/**
8787
* Information about how many files have been checked

cli/threadexecutor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ void ThreadExecutor::reportInfo(const ErrorLogger::ErrorMessage &msg)
348348
writeToPipe(REPORT_INFO, msg.serialize());
349349
}
350350

351-
void ThreadExecutor::reportVerification(const std::string &str)
351+
void ThreadExecutor::bughuntingReport(const std::string &str)
352352
{
353353
writeToPipe(REPORT_VERIFICATION, str.c_str());
354354
}

cli/threadexecutor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class ThreadExecutor : public ErrorLogger {
5454
void reportOut(const std::string &outmsg) OVERRIDE;
5555
void reportErr(const ErrorLogger::ErrorMessage &msg) OVERRIDE;
5656
void reportInfo(const ErrorLogger::ErrorMessage &msg) OVERRIDE;
57-
void reportVerification(const std::string &str) OVERRIDE;
57+
void bughuntingReport(const std::string &str) OVERRIDE;
5858

5959
/**
6060
* @brief Add content to a file, to be used in unit testing.

gui/newsuppressiondialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ NewSuppressionDialog::NewSuppressionDialog(QWidget *parent) :
1616
void reportErr(const ErrorLogger::ErrorMessage &msg) override {
1717
errorIds << QString::fromStdString(msg.id);
1818
}
19-
void reportVerification(const std::string &/*str*/) override {}
19+
void bughuntingReport(const std::string &/*str*/) override {}
2020
QStringList errorIds;
2121
};
2222

gui/threadresult.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class ThreadResult : public QObject, public ErrorLogger {
7474
*/
7575
void reportOut(const std::string &outmsg) override;
7676
void reportErr(const ErrorLogger::ErrorMessage &msg) override;
77-
void reportVerification(const std::string &/*str*/) override {}
77+
void bughuntingReport(const std::string &/*str*/) override {}
7878

7979
public slots:
8080

lib/cppcheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,9 +1286,9 @@ void CppCheck::reportStatus(unsigned int /*fileindex*/, unsigned int /*filecount
12861286

12871287
}
12881288

1289-
void CppCheck::reportVerification(const std::string &str)
1289+
void CppCheck::bughuntingReport(const std::string &str)
12901290
{
1291-
mErrorLogger.reportVerification(str);
1291+
mErrorLogger.bughuntingReport(str);
12921292
}
12931293

12941294
void CppCheck::getErrorMessages()

lib/cppcheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class CPPCHECKLIB CppCheck : ErrorLogger {
195195
*/
196196
void reportOut(const std::string &outmsg) OVERRIDE;
197197

198-
void reportVerification(const std::string &str) OVERRIDE;
198+
void bughuntingReport(const std::string &str) OVERRIDE;
199199

200200
std::list<std::string> mErrorList;
201201
Settings mSettings;

lib/errorlogger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ class CPPCHECKLIB ErrorLogger {
407407
reportErr(msg);
408408
}
409409

410-
virtual void reportVerification(const std::string &str) = 0;
410+
virtual void bughuntingReport(const std::string &str) = 0;
411411

412412
/**
413413
* Report unmatched suppressions

lib/exprengine.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,7 +1794,7 @@ void ExprEngine::executeFunction(const Scope *functionScope, const Tokenizer *to
17941794
}
17951795
}
17961796

1797-
// Write a verification report
1797+
// Write a report
17981798
if (bugHuntingReport) {
17991799
report << "[function-report] "
18001800
<< Path::stripDirectoryPart(tokenizer->list.getFiles().at(functionScope->bodyStart->fileIndex())) << ":"
@@ -1827,7 +1827,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
18271827
if (tok->astParent()->astOperand2() == tok && value.isEqual(dataBase, 0)) {
18281828
dataBase->addError(tok->linenr());
18291829
std::list<const Token*> callstack{tok->astParent()};
1830-
const char * const id = (tok->valueType() && tok->valueType()->isFloat()) ? "verificationDivByZeroFloat" : "verificationDivByZero";
1830+
const char * const id = (tok->valueType() && tok->valueType()->isFloat()) ? "bughuntingDivByZeroFloat" : "bughuntingDivByZero";
18311831
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, id, "There is division, cannot determine that there can't be a division by zero.", CWE(369), false);
18321832
errorLogger->reportErr(errmsg);
18331833
}
@@ -1877,7 +1877,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
18771877
errorMessage += " Note that unsigned integer overflow is defined and will wrap around.";
18781878

18791879
std::list<const Token*> callstack{tok};
1880-
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "verificationIntegerOverflow", errorMessage, false);
1880+
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingIntegerOverflow", errorMessage, false);
18811881
errorLogger->reportErr(errmsg);
18821882
};
18831883
#endif
@@ -1943,7 +1943,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
19431943

19441944
dataBase->addError(tok->linenr());
19451945
std::list<const Token*> callstack{tok};
1946-
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "verificationUninit", "Cannot determine that '" + tok->expressionString() + "' is initialized", CWE_USE_OF_UNINITIALIZED_VARIABLE, false);
1946+
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingUninit", "Cannot determine that '" + tok->expressionString() + "' is initialized", CWE_USE_OF_UNINITIALIZED_VARIABLE, false);
19471947
errorLogger->reportErr(errmsg);
19481948
};
19491949
#endif
@@ -1991,7 +1991,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
19911991
ErrorLogger::ErrorMessage errmsg(callstack,
19921992
&tokenizer->list,
19931993
Severity::SeverityType::error,
1994-
"verificationInvalidArgValue",
1994+
"bughuntingInvalidArgValue",
19951995
"There is function call, cannot determine that " + std::to_string(num) + getOrdinalText(num) + " argument value meets the attribute " + bad, CWE(0), false);
19961996
errorLogger->reportErr(errmsg);
19971997
return;
@@ -2040,7 +2040,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
20402040
if (err) {
20412041
dataBase->addError(tok->linenr());
20422042
std::list<const Token*> callstack{tok};
2043-
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "verificationInvalidArgValue", "There is function call, cannot determine that " + std::to_string(num) + getOrdinalText(num) + " argument value is valid. Bad value: " + bad, CWE(0), false);
2043+
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingInvalidArgValue", "There is function call, cannot determine that " + std::to_string(num) + getOrdinalText(num) + " argument value is valid. Bad value: " + bad, CWE(0), false);
20442044
errorLogger->reportErr(errmsg);
20452045
break;
20462046
}
@@ -2055,7 +2055,7 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
20552055
if (v.second->isUninit()) {
20562056
dataBase->addError(tok->linenr());
20572057
std::list<const Token*> callstack{tok};
2058-
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "verificationUninitArg", "There is function call, cannot determine that " + std::to_string(num) + getOrdinalText(num) + " argument is initialized.", CWE_USE_OF_UNINITIALIZED_VARIABLE, false);
2058+
ErrorLogger::ErrorMessage errmsg(callstack, &tokenizer->list, Severity::SeverityType::error, "bughuntingUninitArg", "There is function call, cannot determine that " + std::to_string(num) + getOrdinalText(num) + " argument is initialized.", CWE_USE_OF_UNINITIALIZED_VARIABLE, false);
20592059
errorLogger->reportErr(errmsg);
20602060
break;
20612061
}
@@ -2079,5 +2079,5 @@ void ExprEngine::runChecks(ErrorLogger *errorLogger, const Tokenizer *tokenizer,
20792079
if (settings->bugHuntingReport.empty())
20802080
std::cout << report.str();
20812081
else if (errorLogger)
2082-
errorLogger->reportVerification(report.str());
2082+
errorLogger->bughuntingReport(report.str());
20832083
}

0 commit comments

Comments
 (0)