Skip to content
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

fix filename pattern matching #127

Merged

Conversation

pjjw
Copy link
Contributor

@pjjw pjjw commented Jan 28, 2024

found a less-intrusive way to do this vs #120

Fixes #117 and #122.


Type of change

  • Bug fix (change which fixes an issue)

Test plan

pjjw and others added 2 commits January 28, 2024 17:34
git ls-files seems to match against filename strings exactly, and
doesn't use the same logic as e.g. gitignore. this means that to match
files by exact filename below the root, we need a */ at the start of the
pattern to match more than files strictly at the root of the tree. these
prefixed patterns however miss the root, so we need to include both
forms.

this is doable with bash array regexes to avoid changing the pattern
format to work with both find and git ls-files at the same time.
@alexeagle alexeagle force-pushed the pjjw/fix-filename-pattern-matching-alt branch from 3deec70 to 95056f7 Compare January 29, 2024 01:39
Copy link
Member

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

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

Yeah there we go, very precise :)
Thanks!

I rebased to pick up and update the new tests which caught more missing files than I realized.

@alexeagle alexeagle merged commit e1d6a2d into aspect-build:main Jan 29, 2024
8 checks passed
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.

[Bug]: Starlark formatter no longer touches BUILD files
2 participants