top | item 46556161

Avoid aligning keys and values in source code unnecessarily

4 points| adrianmsmith | 1 month ago |databasesandlife.com

6 comments

order

Juliate|1 month ago

Diff tools have managed pretty much well this formatting issue (ignore whitespace) so it's not really a topic anymore.

adrianmsmith|1 month ago

Interesting. Yeah I did think maybe this could be solved by more tooling. But at my place it work it isn’t, at least at the moment. Perhaps I could change that.

Do you have any info on what I could use to make the command-line “git diff” and “git rebase” handle this style of formatting? Ideally so the latter merges and produces code which matches “gofmt” output?

On the other hand I suppose my point is that even if there were such tooling, using style of formatting doesn’t offer enough (any?) benefit to justify the effort of introducing the tooling.

elzbardico|1 month ago

You can pry my alignment format rules out of my cold dead hands.

I Absolutely love how the use of white space makes things more readable.