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: look for gitignore file until the git root #200

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

nikaro
Copy link
Contributor

@nikaro nikaro commented Aug 2, 2024

Currently yamlfmt fails if the gitignore file is not found in the current directory. This is not desirable as sometimes we may work in sub-directories of a repo.

This PR looks for the gitignore file until the root of repo and fails if not found (and eventually until the root of the filesystem if no gitdir is found).

Closes #199

Copy link

google-cla bot commented Aug 2, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Collaborator

@braydonk braydonk left a comment

Choose a reason for hiding this comment

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

Thank you for the feature!

@braydonk braydonk merged commit 44b683a into google:main Aug 2, 2024
7 checks passed
@nikaro nikaro deleted the fix/search-gitignore branch August 2, 2024 16:09
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.

Do not fail if gitignore not found
2 participants