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

yamlfmt: fix standard mode exclude bug #124

Merged
merged 1 commit into from Jun 7, 2023

Conversation

braydonk
Copy link
Collaborator

@braydonk braydonk commented Jun 7, 2023

Due to a misunderstanding on my part, I swapped standard filepath collection mode to calculate exclusions using absolute paths. This worked because of the way tests were written, but it does not work in most real world scenarios and it slipped by. I will be able to catch this better when I implement proper integration testing.

This PR removes the absolute paths from the calculation, and adds a doc entry to recommend that paths are always specified relative to the command working directory.

Closes #121 (exclude paths bug)
Closes #97 (doc change to suggest that paths are generally specified relative to command working directory)

Due to a misunderstanding on my part, I swapped standard filepath
collection mode to calculate exclusions using absolute paths. This
worked because of the way tests were written, but it does not work in
most real world scenarios and it slipped by. I will be able to catch
this better when I implement proper integration testing.

This PR removes the absolute paths from the calculation, and adds a doc
entry to recommend that paths are always specified relative to the
command working directory.
@braydonk braydonk merged commit 908b190 into google:main Jun 7, 2023
4 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.

Exclude patterns not working as expected Doublestar excludes doesn't seem to work:
1 participant