[riot-devel] conventions for includes
ludwig.ortmann at fu-berlin.de
Fri Sep 27 17:06:01 CEST 2013
On 09/27/2013 04:29 PM, Oleg Hahm wrote:
>> looking at Christian's commit, I'm wondering whether we should have
>> some conventions regarding the ordering of includes.
>> Right now, it's rather chaotic. At least we're not mixing standard
>> includes (stdint.h) with our own (kernel.h).
>> I propose having standard includes first, then a new line, then our
>> system includes, then the app/lib specific stuff. Blocks seperated by
>> an empty line. Ordered alphabetically, as any other ordering is
>> totally arbitrary.
> in general: +1
> However, I would not insist on alphabetical ordering, because in some cases
> the ordering does matter.
> Additional, I would suggest to use angle brackets only for standard libc
> includes (e.g. <stdio.h> or <inttypes.h>), and use quotes for RIOT's own
> headers (e.g. "msg.h" or "sixlowpan/mac.h").
I thought this was already part of our coding conventions?
>> Comments? Do you think this is "overconventioning"?
> It might be a bit too much, but I think it's necessary if we want our code to
> look neat and understandable.
More information about the devel