[FIX] skiplist does not match windows paths with forward slashes - #5017
Open
ferkulat wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
maybe it would be better to normalize the path in |
ferkulat
force-pushed
the
4997-skiplist-does-not-match-windows-paths-with-forward-slashes
branch
from
August 9, 2026 20:03
a48b6a8 to
2a366f1
Compare
…ompile_commands.json compile_commands.json on windows can contain file paths with forward slashes. we need to apply `os.path.normpath()` to source file path before matching it against the normalized skiplist entry
ferkulat
force-pushed
the
4997-skiplist-does-not-match-windows-paths-with-forward-slashes
branch
from
August 10, 2026 12:00
2a366f1 to
8954fa2
Compare
barnabasdomozi
requested changes
Aug 28, 2026
| if details['source'] == '.': | ||
| details['source'] = '' | ||
|
|
||
| details['source'] = os.path.normpath(details['source']) |
Collaborator
There was a problem hiding this comment.
Running os.path.normpath() on an empty string returns '.', effectively undoing line 1088.
Also, add a comment here which explains the rationale behind this change.
| self.assertEqual(len(build_actions), 3) | ||
|
|
||
| def test_no_skip_windows_paths_with_forward_slash(self): | ||
| """Keep everything for analysis, no skipping there.""" |
Collaborator
There was a problem hiding this comment.
Please give a more accurate description what this test case does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4997
compile_commands.json on windows can contain file paths with forward slashes.
we need to apply
os.path.normpath()to source file path before matching it against the normalized skiplist entry