github google/yamlfmt v0.5.0

latest releases: v0.14.0, v0.13.0, v0.12.1...
2 years ago

There was a bug in v0.4.0 caused by my oversight that I previously relied on empty string to represent no diffs. With the more robust reporter this was no longer true. I pulled in an update to the package that provides a diff count from the Diff function and used that instead. While fixing that, I realized that the line separator for the multilinediff also assumed lf line endings, which was basically a bug since the beginning. I fixed it with a rearchitecture that allowed for line_ending to be a global setting. There is a chance I'll decide to adjust this again in the future, but in my current architecture that was the only way to make it work (other than autodetecting the line endings based on OS, but OS does not always imply line endings since there's lots of LF line ending folks on Windows).
It also made sense while doing this to adjust the yamlfmt.Factory interface to simply be one function NewFormatter, and make it so that function handles the case where the passed config is nil.

Changelog

  • f0be560 feat: global linesep character, handle diffs (#50)

Don't miss a new yamlfmt release

NewReleases is sending notifications on new releases.