jsonnet
jsonnet copied to clipboard
jsonnetfmt adds odd newlines at the end of the file
If the file ends with a comment then jsonnetfmt filename.jsonnet will add odd newline at the end of the file.
andor@localhost:~/tmp$ jsonnetfmt --version
Jsonnet reformatter v0.16.0
andor@localhost:~/tmp$ cat testme.jsonnet
[]
// testme
andor@localhost:~/tmp$ jsonnetfmt testme.jsonnet
[]
// testme
andor@localhost:~/tmp$ jsonnetfmt testme.jsonnet | jsonnetfmt -
[]
// testme
andor@localhost:~/tmp$ jsonnetfmt testme.jsonnet | jsonnetfmt - | jsonnetfmt -
[]
// testme
andor@localhost:~/tmp$
Fixed on main with this commit: https://github.com/google/jsonnet/commit/108e5d7ba7de3dfa42468461acbb3b1385aed629
Closing as fixed (thanks @netomi for the commit reference!)