MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / suppressionAsText

Function suppressionAsText

gui/projectfiledialog.cpp:93–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91};
92
93static std::string suppressionAsText(const SuppressionList::Suppression& s)
94{
95 std::string ret;
96 if (!s.errorId.empty())
97 ret = s.errorId;
98 if (!s.fileName.empty())
99 ret += " fileName=" + s.fileName;
100 if (s.lineNumber != SuppressionList::Suppression::NO_LINE)
101 ret += " lineNumber=" + std::to_string(s.lineNumber);
102 if (!s.symbolName.empty())
103 ret += " symbolName=" + s.symbolName;
104 if (s.hash > 0)
105 ret += " hash=" + std::to_string(s.hash);
106 if (startsWith(ret," "))
107 return ret.substr(1);
108 return ret;
109}
110
111QStringList ProjectFileDialog::getProjectConfigs(const QString &fileName)
112{

Callers 2

addSingleSuppressionMethod · 0.85
getSuppressionIndexMethod · 0.85

Calls 2

startsWithFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected