Re: Reformat src files with `erlfmt` on `main`

2021-06-03 Thread Bessenyei Balázs Donát
Thank you for relaying Paul's approval, @Robert Newson ! > asks if we've confirmed that the abstract syntax tree is unaffected (i.e, the > changes are purely cosmetic and make no difference to the compiled artifacts). The script format_all [1] gets md5sum for the binaries of the files to be

Re: Reformat src files with `erlfmt` on `main`

2021-06-03 Thread Robert Newson
As Paul's involuntary amanuensis he says "go for it" but asks if we've confirmed that the abstract syntax tree is unaffected (i.e, the changes are purely cosmetic and make no difference to the compiled artifacts). B. > On 2 Jun 2021, at 09:18, Bessenyei Balázs Donát wrote: > >> My only

Re: Reformat src files with `erlfmt` on `main`

2021-06-02 Thread Bessenyei Balázs Donát
> My only nose-wrinkle was at `->` being placed on its own line under some circumstances I counted too many occurrences of that to add ignores for them (and people would probably forget adding them on new code which would result in a mixed state). If there are no objections, I'll go ahead with

Re: Reformat src files with `erlfmt` on `main`

2021-05-28 Thread Ilya Khlopotov
> Can it also be set up as a local git hook etc? Few complications here: 1) CouchDB codebase is not 100% resides in a single repository 2) Which hook manager to use given differences in platforms we support and the fact that none of the hook managers support multiple repositories. There are

Re: Reformat src files with `erlfmt` on `main`

2021-05-21 Thread Robert Newson
Hi, My only nose-wrinkle was at `->` being placed on its own line under some circumstances. The rest looked good. I agree that uniformity of formatting is a very good thing and this reformat is long overdue. Agree with Donat that the formatting should be enforced by CI tools so there’s no

Re: Reformat src files with `erlfmt` on `main`

2021-05-21 Thread Bessenyei Balázs Donát
Hi All, I believe I've only seen +>=0s so far so I intend to (in the following order): * wait for an ok from @Robert Newson and @Paul J. Davis * add `erlfmt-ignore`s if necessary to #3568 * add a check to CI (ideally via `make`) to ensure `erlfmt` is +1 on the PRs in #3568 * create a PR for 3.x

Re: Reformat src files with `erlfmt` on `main`

2021-05-20 Thread Joan Touzet
In general I am +0.5 on the entire thing, but would like to see Bob Newson or Paul Davis speak up. In the past they've been the most vocal about code formatting standards, and I'd at least like to see a +0 from both of them. -Joan On 20/05/2021 11:53, Ilya Khlopotov wrote: > Good idea Donat!!!

Re: Reformat src files with `erlfmt` on `main`

2021-05-20 Thread Ilya Khlopotov
Good idea Donat!!! Even though I disagree with some of the choices made by erlfmt I appreciate consistency it provides. The choices are logical. I really love that every decision is documented and properly discussed. I did read PR in its entirety and in fact was not even noticed the ugly `->`

Re: Reformat src files with `erlfmt` on `main`

2021-05-19 Thread Nick Vatamaniuc
Good idea, Donát! Thanks for giving it a try. Even though I personally think emilio has a better style, and I don't agree with some of the choices erlfmt makes, I still think it would still be a net benefit to having consistency if we get automated code reformatting. So +1 overall. If there are

Reformat src files with `erlfmt` on `main`

2021-05-18 Thread Bessenyei Balázs Donát
Hi dev@couchdb, To eliminate the need for formatting-related comments and thus unnecessary cycles in PRs, I've invested a little time to see if we could use a formatter on `main` [1]. The PR reformats `.erl` files in `src` and the script [2] included shows that the compiled binaries match