Code style?

Maria Jan Matejka jan.matejka at nic.cz
Tue Jun 11 16:15:45 CEST 2019


On 6/11/19 3:49 PM, Ondrej Zajicek wrote:
> On Tue, Jun 11, 2019 at 01:37:42PM +0000, Kenth Eriksson wrote:
>> Is there a code style guide to be used when submitting patches to bird?
>> An emacs file, clang-format or similar would be useful. 
> 
> Hi
> 
> Well, historically different parts of BIRD used different coding styles,
> now we try to converge on 2 columns per indentation, Allman style
> (opening brace on new line). Canonical way to indent to X-th column is
> by X/8 tabs and X%8 spaces.
> 
> For EMACS, it is:
> 
> (setq-default c-default-style "bsd")
> (setq-default c-basic-offset 2)

Even currently different parts of BIRD use different coding styles
as I can't get used to Allman or EMACS when writing completely new code.
So parts of BIRD are still being written in (something like) Linux kernel style
with 2 columns per indentation.

The main rule is to use the same style as the file uses around the new code.
Yes, it's somehow a mess, we know; we won't do much about that.

Maria

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3055 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20190611/9bdaabd2/attachment.p7s>


More information about the Bird-users mailing list