github google/yamlfmt v0.8.0

latest releases: v0.14.0, v0.13.0, v0.12.1...
20 months ago

The Indentless Array Release

The bulk of this release is code cleanup, however there are a couple notable features that have made it in as well!

Features

Indentless Arrays

This was a feature that I've wanted to include since the original release of the tool, however I couldn't make it happen until switching to the yaml library fork. Now that I've done that, I added the functionality to the library and have added a config field indentless_arrays to enable it in yamlfmt!

Quiet Mode

A new CLI flag, -quiet has been added. It only has an effect on Dry Run or Lint. Instead of outputting all the full diffs to the stdout, Quiet Mode will only output the names of the files that had formatting differences.

This work changed the yamlfmt API a bit, primarily in engine. I am not currently aware of anyone relying on the yamlfmt API, but if you are make sure you update yourself to match the new setup. I think it's much better now than it was before.

Bug Fixes

Max Line Length default adjustment

The original default setting for max line length default did not match the intention/what the documentation suggested. It uses the default value of 0, which makes the default line length 80 in the library under the hood. It is supposed to be -1, essentially infinite, by default. This has been fixed.

precommit hook more well formed

The pre_commit hook originally included the . directory as part of the entry. Because precommit actually provides all found files as positional arguments to the entry command, there's no reason to do that. The hook is now more properly formed.

Contributors

Thanks @sangheee for the max line length fix!


Thank you very much for over 700 stars! It's really exciting to see my tool getting usage, and I hope that the tool continues to help people.

Don't miss a new yamlfmt release

NewReleases is sending notifications on new releases.