Rename ErrorMessage::toText() to ErrorMessage::toString().
This commit is contained in:
parent
05adb285c5
commit
fa0f6edacf
|
@ -108,6 +108,6 @@ void CppCheckExecutor::reportErr(const ErrorLogger::ErrorMessage &msg)
|
|||
}
|
||||
else
|
||||
{
|
||||
reportErr(msg.toText(_settings._outputFormat));
|
||||
reportErr(msg.toString(_settings._outputFormat));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ int ThreadExecutor::handleRead(unsigned int &result)
|
|||
msg.deserialize(buf);
|
||||
|
||||
// Alert only about unique errors
|
||||
std::string errmsg = msg.toText();
|
||||
std::string errmsg = msg.toString();
|
||||
if (std::find(_errorList.begin(), _errorList.end(), errmsg) == _errorList.end())
|
||||
{
|
||||
_errorList.push_back(errmsg);
|
||||
|
|
|
@ -836,7 +836,7 @@ Settings CppCheck::settings() const
|
|||
|
||||
void CppCheck::reportErr(const ErrorLogger::ErrorMessage &msg)
|
||||
{
|
||||
std::string errmsg = msg.toText();
|
||||
std::string errmsg = msg.toString();
|
||||
|
||||
// Alert only about unique errors
|
||||
if (std::find(_errorList.begin(), _errorList.end(), errmsg) != _errorList.end())
|
||||
|
|
|
@ -169,7 +169,7 @@ void ErrorLogger::ErrorMessage::findAndReplace(std::string &source, const std::s
|
|||
}
|
||||
}
|
||||
|
||||
std::string ErrorLogger::ErrorMessage::toText(const std::string &outputFormat) const
|
||||
std::string ErrorLogger::ErrorMessage::toString(const std::string &outputFormat) const
|
||||
{
|
||||
if (outputFormat.length() == 0)
|
||||
{
|
||||
|
|
|
@ -89,7 +89,7 @@ public:
|
|||
* @param outputFormat Empty string to use default output format
|
||||
* or template to be used. E.g. "{file}:{line},{severity},{id},{message}"
|
||||
*/
|
||||
std::string toText(const std::string &outputFormat = "") const;
|
||||
std::string toString(const std::string &outputFormat = "") const;
|
||||
|
||||
/**
|
||||
* Replace all occurances of searchFor with replaceWith in the
|
||||
|
|
|
@ -385,7 +385,7 @@ private:
|
|||
loc.file = "ab/cd/../ef.h";
|
||||
errorMessage._callStack.push_back(loc);
|
||||
ASSERT_EQUALS("<error file=\"ab/ef.h\" line=\"0\" id=\"\" severity=\"\" msg=\"\"/>", errorMessage.toXML());
|
||||
ASSERT_EQUALS("[ab/ef.h:0]: ", errorMessage.toText());
|
||||
ASSERT_EQUALS("[ab/ef.h:0]: ", errorMessage.toString());
|
||||
}
|
||||
|
||||
void templateFormat()
|
||||
|
@ -399,8 +399,8 @@ private:
|
|||
errorMessage._severity = "testSeverity";
|
||||
errorMessage._msg = "long testMessage";
|
||||
ASSERT_EQUALS("<error file=\"some/{file}file.cpp\" line=\"10\" id=\"testId\" severity=\"testSeverity\" msg=\"long testMessage\"/>", errorMessage.toXML());
|
||||
ASSERT_EQUALS("[some/{file}file.cpp:10]: (testSeverity) long testMessage", errorMessage.toText());
|
||||
ASSERT_EQUALS("testId-some/{file}file.cpp,testSeverity.10?{long testMessage}", errorMessage.toText("{id}-{file},{severity}.{line}?{{message}}"));
|
||||
ASSERT_EQUALS("[some/{file}file.cpp:10]: (testSeverity) long testMessage", errorMessage.toString());
|
||||
ASSERT_EQUALS("testId-some/{file}file.cpp,testSeverity.10?{long testMessage}", errorMessage.toString("{id}-{file},{severity}.{line}?{{message}}"));
|
||||
}
|
||||
|
||||
void getErrorMessages()
|
||||
|
|
|
@ -223,5 +223,5 @@ void TestFixture::reportOut(const std::string & outmsg)
|
|||
|
||||
void TestFixture::reportErr(const ErrorLogger::ErrorMessage &msg)
|
||||
{
|
||||
errout << msg.toText() << std::endl;
|
||||
errout << msg.toString() << std::endl;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue