[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNUnet-developers] Coding style clang-format

From: Florian Dold
Subject: Re: [GNUnet-developers] Coding style clang-format
Date: Mon, 15 Apr 2019 11:35:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hi Hartmut,

It's a bit disheartening to see an honest attempt to improve things
being shot down like this.

The clang-format style that Martin created tries to mirror what style
the existing codebase already has or is supposed to have.  If you want
to make any tweaks on top of that, please contribute them or voice your
criticism constructively!

GNUnet isn't completely following the GNU Coding Standards anyway, is it?

And to suggest that everybody should use Emacs to format code is
outright ridiculous.  Unlike clang-format, it does not integrate into
other editors (yes, those do exist!), and it sucks badly at formatting
code.  It only does indentation.  Well, unless your lines are too long.

GNUnet is rife with "char * foo;", weirdly formatted macros and overly
long lines.  Emacs won't fix those.

Please also think of people (students!) that don't have your exact setup
and want to contribute to GNUnet without having to use Emacs, and
without somebody having to do manual code review for code style.  At
least Guix has some helper script that formats the code using Emacs
under the hood, without having to know Emacs!

- Florian

On 4/15/19 10:53 AM, Hartmut Goebel wrote:
> Am 15.04.19 um 10:02 schrieb Schanzenbach, Martin:
>> FYI I added a clang-format at "contrib/conf/editors/clang-format".
> I'm curious about this, since the development guide says: "We follow the
> GNU Coding Standards (see The GNU Coding Standards
> <> in The GNU
> Coding Standards).
> Beside this: If you switch to clang coding style, please adjust
> .dir-locals.el to pull in the correct settings and make sure this is
> available in all of our repos. See
> Also I'm curious about you adding this to the code first and then
> discussion the topic. If we decide *not* to change the coding style, we
> will have dead artifacts trashing all developers repos for years.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]