[riot-notifications] [RIOT-OS/RIOT] uncrustify: add auto uncrustify with blacklist (#8519)

Kaspar Schleiser notifications at github.com
Fri Jan 25 11:51:45 CET 2019


I would like to revive this.
IMO, what I've seen from Vera++, it is not the right tool to enforce a certain code beautifying. uncrustify is much easier to set up for our users.

As far as I can see, the reasons we're not enforcing a certain uncrustify configuration are:

1. we cannot get consensus for a certain style
2. uncrustify cannot be configured to enforce exactly the style we would like it to

To be honest, I think we should make uncrustify a participant of the discussion and give it 100 times the weight, as in, "guys *this* is what can be done".

Things like this:

>    There are some cases where Uncrustify can handle our coding convention:

```
for(...); //This is my comment

goes to

for(...) {
    //This is my comment
}

instead of

for (...) {} //This is my comment
```

Do they matter that much? Personally I do not care anymore, if in turn I do not have to *ever* deal with formatting anymore. (Unless I want to do ASCII art, but then I can do INDENT-OFF.)

I do see that currently we'd have thousands of lines that would be changed, many of which we don't want to be changed.

Why don't we go with a whitelist first? That way we can slowly adapt the codebase.

I suggest the following:

1. from this PR, remove the "uncrustify-force" config, just use "uncrustify-riot.conf" from the root
2. in addition to the blacklist file, add a whitelist. Start small (e.g., just with core/).
3. get consensus on reduced maintanance / review time over "I prefer this or that style", make "uncrustify-riot.cfg" authorative
4. add a message to the coding convention for that
5. add a wiki page explaining why and how uncrustify

@jia200x If you don't mind I'll add commits for the whitelist.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/8519#issuecomment-457534566
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190125/4f09cb1d/attachment.html>


More information about the notifications mailing list