+
Skip to content

Conversation

jmuhlich
Copy link
Member

@jmuhlich jmuhlich commented Oct 8, 2025

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

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

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.
@jmuhlich jmuhlich force-pushed the get-wf-files-ignores branch from 231ad00 to 3cae307 Compare October 8, 2025 21:37
Copy link

codecov bot commented Oct 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.36%. Comparing base (7a02ae6) to head (5c6c50d).

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@mashehu mashehu left a 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

Copy link
Member

@mirpedrol mirpedrol left a 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pipeline linting test pipeline_if_empty_null can be extremely slow in some contexts

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载