google / yamlfmt

An extensible command line tool or library to format yaml files.
Apache License 2.0
1.2k stars 48 forks source link

fix: look for gitignore file until the git root #200

Closed nikaro closed 4 months ago

nikaro commented 4 months ago

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

google-cla[bot] commented 4 months ago

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.