mustache / spec

The Mustache spec.
MIT License
361 stars 71 forks source link

Pretty print JSON files, and terminate with newline #119

Closed softmoth closed 3 years ago

softmoth commented 3 years ago

Text files that don't end with a newline can be troublesome or unacceptable in some contexts.

The only down side is a bit of merging hassle for existing pull requests. But that happens anyways, and of course the YAML file is authoritative so JSON conflicts can be ignored in practice.

gasche commented 3 years ago

Looks fine to me.

(It would also be nice to have some kind of human-friendlier printing of the generated JSON, because currently it is painful for implementations that use the JSON to locate the source of a test failure within the big generated one-liner.)

softmoth commented 3 years ago

Yes, @gasche, good point. I found how to do that. Its default looks pretty good, I think. I've updated this PR.

gasche commented 3 years ago

Very nice! Thanks.

Danappelxx commented 3 years ago

I'm a tiny bit hesitant to merge this since all other pull requests would need to be re-run. I'll merge a few and then come back to this one.

Danappelxx commented 3 years ago

I am very much in favor of the quality-of-life and readability improvement this provides! I merged a few active pull requests, can you go ahead and re-generate the json?

softmoth commented 3 years ago

I force-pushed an update of the specs/*.json files.

Danappelxx commented 3 years ago

Thanks!