On 1/9/24 3:20 PM, Tom Lane wrote:
In short, I don't think that putting this into CI is the answer. Putting it into committers' standard workflow is a better idea, if we can get all the committers on board with that.
FWIW, that's the approach that go takes - not only for committing to go itself, but it is *strongly* recommended[1] that anyone writing any code in go makes running `go fmt` a standard part of their workflow. In my experience, it makes collaborating noticably easier because you never need to worry about formatting differences. FYI, vim makes this easy via vim-autoformat[2] (which also supports line-by-line formatting if the format tool allows it); presumably any modern editor has similar support.
1: Literally 3rd item at https://go.dev/doc/effective_go 2: https://github.com/vim-autoformat/vim-autoformat -- Jim Nasby, Data Architect, Austin TX