couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: [POLL] Erlang whitespace standards
Date Tue, 01 Apr 2014 12:17:04 GMT
On Sun, Mar 30, 2014 at 3:42 AM, Joan Touzet <joant@atypical.net> wrote:

> Thanks, Benoit. Sadly there's almost no indentation / whitespace info
> in those rules - they're more about the overall shape of the code. I
> do like them, though!
>
> -Joan
>
>
Well you can see in that file some indentation used in the example. After
that we should just avoid any tab in the code...

Anyway imo using indentation provided in emacs or vimerl (which are
similar) is quite enougg. It follows the common rules used inside erlang.

- benoit


>  ----- Original Message -----
> From: "Benoit Chesneau" <bchesneau@gmail.com>
> To: dev@couchdb.apache.org
> Sent: Saturday, March 29, 2014 4:44:58 PM
> Subject: Re: [POLL] Erlang whitespace standards
>
> I filled the poll, but maybe we could just use the erlang style rules:
>
> http://www.erlang.se/doc/programming_rules.shtml
>
> This is by default in vimerl, not sure for emacs but most probably.
>
> - benoit
>
>
> On Fri, Mar 28, 2014 at 10:11 PM, Joan Touzet <wohali@apache.org> wrote:
>
> > Time for everyone's favourite topic: whitespace standards.
> >
> > I know many of you are fed up with not being able to auto format in
> > your favourite editor and match the CouchDB Erlang coding standards, or
> > receiving pull requests that are formatted poorly.
> >
> > I'd like to fix that with an appropriate whitespace standard, and
> > supplementary plugins for vi and emacs that will just Do The Right Thing
> > and let us all stop worrying about whitespace corrections in pull
> > requests.
> >
> > The basic rules seem to be:
> >
> >     * Indent everything 4 spaces (not 2 or 8, and no tabs)
> >     * Single blank lines between functions
> >     * No blank lines between guarded versions of the
> >       same function (e.g. couch_btree.erl#L36-L47)
> >
> > but beyond that there is some inconsistency in both the code and in
> > discussion with other devs.
> >
> > Here's a short poll I threw together in Google Docs. I'd love it if you
> > could take 5 minutes to reply to it. Early next week I'll summarize and
> > post the results. Once we have agreement we can toss up a super small
> > Markdown guide / wiki page / whatever and get started on the emacs/vi
> > modifications to support it.
> >
> >
> >
> https://docs.google.com/forms/d/1b7KcQGgNbSCZVRwLjrUl5Z6C2TBx8X1btlU5fwrNHpg/edit#
> >
> > Thanks,
> > Joan
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message