Skip to content

Commit c990c8a

Browse files
committed
fixed #14249 - XML suppression parsing did not simplify the file name
1 parent 7289296 commit c990c8a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

lib/suppressions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ std::string SuppressionList::parseXmlFile(const char *filename)
129129
if (std::strcmp(name, "id") == 0)
130130
s.errorId = text;
131131
else if (std::strcmp(name, "fileName") == 0)
132-
s.fileName = text;
132+
s.fileName = Path::simplifyPath(text);
133133
else if (std::strcmp(name, "lineNumber") == 0)
134134
s.lineNumber = strToInt<int>(text);
135135
else if (std::strcmp(name, "symbolName") == 0)

test/cli/other_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3800,7 +3800,7 @@ def test_premium_disabled_unmatched(tmp_path): #13663
38003800
assert ret == 0, stdout
38013801

38023802

3803-
def test_unmatched_file(tmp_path): # #14248
3803+
def test_unmatched_file(tmp_path): # #14248 / #14249
38043804
lib_path = tmp_path / 'lib'
38053805
os.makedirs(lib_path)
38063806

@@ -3847,6 +3847,7 @@ def test_unmatched_file(tmp_path): # #14248
38473847
'lib/test.c:-1:0: information: Unmatched suppression: error [unmatchedSuppression]',
38483848
'lib/test.c:-1:0: information: Unmatched suppression: error2 [unmatchedSuppression]',
38493849
'lib/test.c:-1:0: information: Unmatched suppression: error3 [unmatchedSuppression]',
3850+
'lib/test.c:-1:0: information: Unmatched suppression: error4 [unmatchedSuppression]',
38503851
'lib/test.c:-1:0: information: Unmatched suppression: error5 [unmatchedSuppression]',
38513852
'lib/test.c:-1:0: information: Unmatched suppression: error6 [unmatchedSuppression]'
38523853
]

0 commit comments

Comments
 (0)