couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Vatamaniuc <>
Subject Re: Reformat src files with `erlfmt` on `main`
Date Wed, 19 May 2021 22:26:15 GMT
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 modules or areas we really don't want reformatted, erlfmt
allows comment pragmas (%% erlfmt-ignore [1]) to disable re-formatting
for some sections of code. There are also some suggestions to do minor
manual refactorings which result in a better formatted code [2] , so
we could apply a few of those in some places.

A few more ideas and comments I had were in the PR comment



On Tue, May 18, 2021 at 2:13 PM Bessenyei Balázs Donát
<> wrote:
> 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 "before" and "after".
> The formatter used in the PR is `erlfmt` [3] which is an opinionated
> [4] tool so it's more of a "take it or leave it" as-is. (We could try
> using other formatters if we want in case people want formatting but
> think the choices `erlfmt` makes are unacceptable.)
> Some members of the CouchDB dev community already left some great
> comments on the PR and I haven't seen any strong opposition so far,
> but I wanted to make sure more people are aware of this.
> If you have any questions, comments or concerns (or objections),
> please let me know.
> Thank you,
> Donat
> [1]:
> [2]:
> [3]:
> [4]:

View raw message