Re: [PATCH] lib/database.cc: fix misleading indentation

Subject: Re: [PATCH] lib/database.cc: fix misleading indentation

Date: Thu, 20 Oct 2016 13:47:40 -0300

To: Franz Fellner, Tomi Ollila, notmuch@notmuchmail.org

Cc: tomi.ollila@iki.fi

From: David Bremner


Franz Fellner <alpine.art.de@gmail.com> writes:

> Probably a little bit off-topic, but somewhat related.
> There is a wild mix of TABs and spaces used for indenting all over the place.
> I had a hard time to follow the code. Could there be done something?
> Do we have some sort of coding style? If not could we agree on some? At least
> for such important things as indentation... It is possible to use e.g. astyle
> to apply the formatting automatically.
>
> Franz

from devel/STYLE:

* Indent is 4 spaces with mixed tab/spaces and a tab width of 8.
  (Specifically, a line should begin with zero or more tabs followed
  by fewer than eight spaces.)

that _should_ be enforced by devel/uncrustify.cfg

On the other hand, there are also no doubt places in the code where this
rule is not adhered to. At the risk of being clichéd, whitespace fixup
patches are welcome.

Finally, it might help to have some settings whatever editor you are
using. I'm happy add a file to add a project .vimrc [1] (or whatever editor
people are using) to complement the .dir-locals.el that is there.

d

[1]: all I know about that I read on https://andrew.stwrt.ca/posts/project-specific-vimrc/

Thread: