Skip to content

Conversation

philprime
Copy link
Member

While working on #5838 I noticed that the YAML files in the .github/workflows path were not linted/formatted on commit, but then fails in the CI.

It turns out the multi-extension matching needs to be parentheses not curly-brackets because the pattern is a Python regex (docs) and can be evaluated like this:

$ python3 -c "import re; print(re.match(r'^.*\.{yaml,yml}$', '.github/workflows/benchmarking.yml'))"
None

$ python3 -c "import re; print(re.match(r'^.*\.(yaml|yml)$', '.github/workflows/benchmarking.yml'))"
<re.Match object; span=(0, 34), match='.github/workflows/benchmarking.yml'>

#skip-changelog

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@philprime philprime merged commit 82f60cf into main Aug 8, 2025
12 checks passed
@philprime philprime deleted the philprime/fix-pre-commit-hooks-yaml branch August 8, 2025 08:46
philipsawyerdd added a commit to justin-doordash/sentry-cocoa that referenced this pull request Sep 25, 2025
philipsawyerdd added a commit to justin-doordash/sentry-cocoa that referenced this pull request Sep 25, 2025
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.

2 participants