Open
Description
Hi,
I am seeking alternatives to gofmt with better arithmetic styling. Sadly, gofmt and some other implementations use inconsistent spacing around arithmetic operators. Specifically, gofmt and friends try too hard to be helpful, bunching up multiplicative expressions without spaces, but then re-expanding them when a formula has no other mathematical operations.
gofmt does this crap:
y := 2*x + 1
z := 2 * x
When it should really pick:
y := 2 * x + 1
z := 2 * x
for readability.
What is a goformat configuration, preferably a text file, to force a single ASCII space on both sides of arithmetic and binary operators, other than negation (!
)?
Metadata
Metadata
Assignees
Labels
No labels