-
Couldn't load subscription status.
- Fork 218
Improve file ignores in workflow file enumeration #3820
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: dev
Are you sure you want to change the base?
Conversation
utils.get_wf_files has logic for parsing .gitignore files and using the patterns there as an ignore list, but it doesn't implement the full semantics of gitignore patterns. This change adds support for trailing slash which should ignore an entire directory, which is important as such patterns are included in the pipeline TEMPLATE .gitignore. Also, relative path handling is implemented in the ignore pattern checking. This means ignore patterns still work correctly when the -d option is given to lint a directory other than the current one. Finally, .git/* is added as an implicit ignore pattern that is always in effect.
231ad00 to
3cae307
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
nice, thanks for this contribution
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.
Thanks for the fix @jmuhlich!
|
Added a test case, ready for merge now. |
utils.get_wf_files has logic for parsing .gitignore files and using the patterns there as an ignore list, but it doesn't implement the full semantics of gitignore patterns. This change adds support for trailing slash which should ignore an entire directory, which is important as such patterns are included in the pipeline TEMPLATE .gitignore.
Also, relative path handling is implemented in the ignore pattern checking. This means ignore patterns still work correctly when the -d option is given to lint a directory other than the current one.
Finally, .git/* is added as an implicit ignore pattern that is always in effect.
I haven't added any tests for the new functionality yet, but I will after getting a thumbs-up on my approach so far.
PR checklist
CHANGELOG.mdis updateddocsis updated