|
Cppcheck
|
This is an interface, which the class responsible of error logging should implement. More...
#include <errorlogger.h>
Classes | |
| class | ErrorMessage |
| Wrapper for error messages, provided by reportErr() More... | |
Public Member Functions | |
| ErrorLogger () | |
| virtual | ~ErrorLogger () |
| virtual void | reportOut (const std::string &outmsg)=0 |
| Information about progress is directed here. | |
| virtual void | reportErr (const ErrorLogger::ErrorMessage &msg)=0 |
| Information about found errors and warnings is directed here. | |
| virtual void | reportProgress (const std::string &filename, const char stage[], const std::size_t value) |
| Report progress to client. | |
| virtual void | reportInfo (const ErrorLogger::ErrorMessage &msg) |
| Output information messages. | |
| void | reportUnmatchedSuppressions (const std::list< Suppressions::SuppressionEntry > &unmatched) |
| Report list of unmatched suppressions. | |
Static Public Member Functions | |
| static std::string | callStackToString (const std::list< ErrorLogger::ErrorMessage::FileLocation > &callStack) |
This is an interface, which the class responsible of error logging should implement.
Definition at line 148 of file errorlogger.h.
| ErrorLogger::ErrorLogger | ( | ) | [inline] |
Definition at line 261 of file errorlogger.h.
| virtual ErrorLogger::~ErrorLogger | ( | ) | [inline, virtual] |
Definition at line 262 of file errorlogger.h.
| std::string ErrorLogger::callStackToString | ( | const std::list< ErrorLogger::ErrorMessage::FileLocation > & | callStack | ) | [static] |
Definition at line 352 of file errorlogger.cpp.
Referenced by ThreadResult::reportErr(), and ErrorLogger::ErrorMessage::toString().
| virtual void ErrorLogger::reportErr | ( | const ErrorLogger::ErrorMessage & | msg | ) | [pure virtual] |
Information about found errors and warnings is directed here.
Override this to receive the errormessages.
| msg | Location and other information about the found error. |
Implemented in CppCheck, CppCheckExecutor, ThreadResult, and ThreadExecutor.
Referenced by CppCheck::checkFile(), SymbolDatabase::debugMessage(), Preprocessor::error(), Preprocessor::getcfgs(), CheckMemoryLeak::reportErr(), CppCheck::reportErr(), Tokenizer::reportError(), reportUnmatchedSuppressions(), TemplateSimplifier::simplifyTemplateInstantiations(), CheckUnusedFunctions::unusedFunctionError(), and Preprocessor::writeError().
| virtual void ErrorLogger::reportInfo | ( | const ErrorLogger::ErrorMessage & | msg | ) | [inline, virtual] |
Output information messages.
| msg | Location and other information about the found error. |
Reimplemented in CppCheck, CppCheckExecutor, and ThreadExecutor.
Definition at line 296 of file errorlogger.h.
Referenced by Preprocessor::missingInclude(), CppCheck::reportInfo(), and Preprocessor::validateCfgError().
| virtual void ErrorLogger::reportOut | ( | const std::string & | outmsg | ) | [pure virtual] |
Information about progress is directed here.
Override this to receive the progress messages.
| outmsg | Message to show e.g. "Checking main.cpp..." |
Implemented in CppCheck, ThreadResult, CppCheckExecutor, and ThreadExecutor.
Referenced by CppCheck::checkFunctionUsage(), CppCheck::findError(), Tokenizer::printUnknownTypes(), CppCheck::processFile(), and CppCheck::reportOut().
| virtual void ErrorLogger::reportProgress | ( | const std::string & | filename, |
| const char | stage[], | ||
| const std::size_t | value | ||
| ) | [inline, virtual] |
Report progress to client.
| filename | main file that is checked |
| stage | for example preprocess / tokenize / simplify / check |
| value | progress value (0-100) |
Reimplemented in CppCheck, and CppCheckExecutor.
Definition at line 286 of file errorlogger.h.
Referenced by CheckBufferOverrun::checkGlobalAndLocalVariable(), Preprocessor::getcfgs(), Preprocessor::handleIncludes(), CppCheck::reportProgress(), Tokenizer::simplifyKnownVariablesSimplify(), and Tokenizer::simplifyTypedef().
| void ErrorLogger::reportUnmatchedSuppressions | ( | const std::list< Suppressions::SuppressionEntry > & | unmatched | ) |
Report list of unmatched suppressions.
| unmatched | list of unmatched suppressions (from Settings::Suppressions::getUnmatched(Local|Global)Suppressions) |
Definition at line 325 of file errorlogger.cpp.
References Severity::information, and reportErr().
Referenced by CppCheckExecutor::check(), and CppCheck::processFile().
1.7.6.1