This repository has been archived by the owner on Sep 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
Always use trailing newlines in multi line arrays #1595
Comments
i don't actually know if TOML allows trailing commas, but if it does, this seems like a clear win. but yeah, it'll be a todo for our TOML lib - /cc @pelletier |
TOML does support trailing commas (and so does go-toml). That sounds like a
small addition to the new Encoder feature :)
--
Thomas Pelletier
|
Trailing commas are now implemented in the TOML library: pelletier/go-toml#217 |
sweet! thanks @ctd1500. we'll get this incorporated as soon as there's a new go-toml release 😄 |
Released go-toml 1.2.0 https://github.com/pelletier/go-toml/releases/tag/v1.2.0 for that |
thank you! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
#1461 switched to using multi line toml arrays in the lock file, while this improved readability it also introduced some additional diff churn.
Before:
After:
This is bad because it increases the chance of merge conflicts in the lock and decreases readability. It was also one of the reasons toml was chosen over a more mainstream format like json.
Proposal: Always add trailing commas, just like in go. This probably requires an upstream change to the toml library.
The text was updated successfully, but these errors were encountered: