Skip to content

Commit 7a11c85

Browse files
committed
handle semicolons in inline suppression comment
1 parent 69d3a0a commit 7a11c85

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cli/processexecutor.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ bool ProcessExecutor::handleRead(int rpipe, unsigned int &result, const std::str
241241
if (!buf.empty()) {
242242
// TODO: avoid string splitting
243243
auto parts = splitString(buf, ';');
244-
if (parts.size() != 4)
244+
if (parts.size() < 4)
245245
{
246246
// TODO: make this non-fatal
247247
std::cerr << "#### ThreadExecutor::handleRead(" << filename << ") adding of inline suppression failed - insufficient data" << std::endl;
@@ -252,6 +252,9 @@ bool ProcessExecutor::handleRead(int rpipe, unsigned int &result, const std::str
252252
suppr.checked = parts[1] == "1";
253253
suppr.matched = parts[2] == "1";
254254
suppr.extraComment = parts[3];
255+
for (std::size_t i = 4; i < parts.size(); i++) {
256+
suppr.extraComment += ";" + parts[i];
257+
}
255258
const std::string err = mSuppressions.nomsg.addSuppression(suppr);
256259
if (!err.empty()) {
257260
// TODO: only update state if it doesn't exist - otherwise propagate error

0 commit comments

Comments
 (0)