-
-
Notifications
You must be signed in to change notification settings - Fork 147
Do not match .DS_Store files in d2d pipeline #2016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Do not match .DS_Store files in d2d pipeline #2016
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds filtering to exclude macOS .DS_Store metadata files from PurlDB matching in the d2d pipeline, addressing issue #1874.
- Adds exclusion of
.DS_Storefiles from PurlDB resource matching
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
scanpipe/pipes/d2d.py
Outdated
| .to_codebase() | ||
| .no_status() | ||
| .has_value("sha1") | ||
| .exclude(path__endswith="/.DS_Store") |
Copilot
AI
Dec 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filter path__endswith="/.DS_Store" will only match .DS_Store files that are in subdirectories (e.g., "foo/.DS_Store"), but will not match .DS_Store files at the root level (i.e., path is exactly ".DS_Store"). Consider using name=".DS_Store" instead to match all .DS_Store files regardless of their location, or use both conditions with an OR query. Alternatively, since other functions in this file already exclude files starting with "." using exclude(name__startswith="."), you might consider applying the same pattern here for consistency and to exclude all hidden files (including .DS_Store).
| .exclude(path__endswith="/.DS_Store") | |
| .exclude(name__startswith=".") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| .exclude(path__endswith="/.DS_Store") | |
| .exclude(path__endswith="/.DS_Store") |
Signed-off-by: Muhammad Abdullah Shahid <108458621+abdollahShahid@users.noreply.github.com>
397e7f4 to
ec5ca9b
Compare
Signed-off-by: Muhammad Abdullah Shahid <108458621+abdollahShahid@users.noreply.github.com>
|
DCO is fixed and all commits are signed off |
Fixes #1874
.DS_Storefiles are macOS metadata files and should not be considered formatching during the d2d pipeline. This change excludes
.DS_Storeresourcesfrom the list of codebase files sent for PurlDB matching.