taler
[Top][All Lists]
Advanced

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

Re: [Taler] Coding style clang-format


From: Christian Grothoff
Subject: Re: [Taler] Coding style clang-format
Date: Thu, 18 Apr 2019 14:57:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Ah, I thought you were talking about less crazy single-file imports
(like say gnunet/src/util/getopt.c from the GNU copylib).  So sure, for
those "big" third party imports we'll need more narrow rules on which
files/directories formatting is to be enforced.

On 4/18/19 2:53 PM, Florian Dold wrote:
> We have *tons* of third party code in akono (Android/Kotlin bindings for
> node.js, part of the PF project), as well as the repository that is used
> to build the GNU Taler wallet for wasm.
> 
> Putting /* clang-format off */ on top of every source file does not
> quite work for these.
> 
> - Florian
> 
> On 4/18/19 2:48 PM, Christian Grothoff wrote:
>> On 4/18/19 2:37 PM, Florian Dold wrote:
>>> I think it's a great idea!  Since clang-format can reformat all of
>>> GNUnet in <1s on my laptop, it should be fast enough to run as part of
>>> every commit.
>>>
>>> However, there must be an option to enable/disable this on a
>>> per-repository or even per-path basis, since we do not want to re-format
>>> third party code that is checked into our repos.
>>
>> Well, I generally would prefer to avoid checking in third party code
>> into our repos, but you are of course right that this does sometimes
>> happen for good reasons.
>>
>> But in that case, I think simply adding a /* clang-format off */ on top
>> of the 3rd party code should do.  And of course the rule should only
>> apply to C and H files in src/.
>>
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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