Skip to content

v0.12.1

Compare
Choose a tag to compare
@github-actions github-actions released this 04 May 13:20
· 25 commits to main since this release
9311c40

Fix stdin output

I made a mistake in the last release that caused the stdin operation to output a byte array instead of a properly casted string. I will add integration tests to save this from happening in the future.

Known Issue: I was in a rush to get this out when I saw it and forgot to manually update the version string, so yamlfmt -version will print v0.12.0 for this version.

v0.12.0 Release notes below.


Output Format Release

I have unfortunately been dealing with a long-running health problem that has made it difficult to do much work on this or any projects for the past couple of months. I did manage to get together some small features and fixes worth noting.

Features

Output Format

You can now choose different output formats for lint/dry run. The first alternate output format added is line, which makes it so instead of the full detailed output, yamlfmt outputs single lines for each file with formatting differences. This should allow for easier integration into tools like reviewdog. I have never used that tool, but if anyone is able to get an integration working, feel free to open a Discussion thread about it and let me know!

More config file name options

Last release, I added configuration file naming options to have the yaml extension, i.e. yamlfmt.yaml and yamlfmt.yml. The way I did that made it so you couldn't have config files with extension also be hidden. That is resolved now, so you can have .yamlfmt.yaml etc.

Bug Fixes

Don't write files if there is no diff

Previously, yamlfmt would always write all files set for formatting even when there would be no change. This meant the edited date of the file was always being updated even though nothing was meant to change. That should not happen anymore.

Fix -global_conf not working as documented

The -global_conf flag was not working as documented in the last release. If there was a local config, -global_conf would end up being ignored and the local config would be used first. This was not the intended functionality and it has been fixed.

Contributors

Thanks @kiliantyler for the catching the global configuration bug and opening a fix for it!

1k stars!

Thank you very much for over 1000 stars on GitHub! I appreciate the support, and I hope the tool continues to be useful to the community!