Пример #1
0
void CppCheckExecutor::reportErr(const ErrorLogger::ErrorMessage &msg)
{
    if (errorlist) {
        reportOut(msg.toXML(false, _settings->_xml_version));
    } else if (_settings->_xml) {
        reportErr(msg.toXML(_settings->_verbose, _settings->_xml_version));
    } else {
        reportErr(msg.toString(_settings->_verbose, _settings->_outputFormat));
    }
}
Пример #2
0
 void xml()
 {
     // Test the errorlogger..
     ErrorLogger::ErrorMessage errmsg;
     errmsg._msg = "ab<cd>ef";
     ASSERT_EQUALS("<error id=\"\" severity=\"\" msg=\"ab&lt;cd&gt;ef\"/>", errmsg.toXML());
 }
Пример #3
0
void CppCheckExecutor::reportErr(const ErrorLogger::ErrorMessage &msg)
{
    if (_settings._xml)
    {
        reportErr(msg.toXML());
    }
    else
    {
        reportErr(msg.toText());
    }
}
Пример #4
0
void Check::reportError(const ErrorLogger::ErrorMessage &errmsg)
{
    std::cout << errmsg.toXML(true, 1) << std::endl;
}
Пример #5
0
void AnalyzerInformation::reportErr(const ErrorLogger::ErrorMessage &msg, bool verbose)
{
    if (fout.is_open())
        fout << msg.toXML(verbose,2) << '\n';
}
Пример #6
0
 void include()
 {
     ErrorLogger::ErrorMessage errmsg;
     ErrorLogger::ErrorMessage::FileLocation loc;
     loc.file = "ab/cd/../ef.h";
     errmsg._callStack.push_back(loc);
     ASSERT_EQUALS("<error file=\"ab/ef.h\" line=\"0\" id=\"\" severity=\"\" msg=\"\"/>", errmsg.toXML());
     ASSERT_EQUALS("[ab/ef.h:0]: ", errmsg.toText());
 }
Пример #7
0
 void reportErr(const ErrorLogger::ErrorMessage &msg)
 {
     const std::string str(msg.toXML(true,2U));
     printf("%s\n", str.c_str());
 }