From: "Vesa Jääskeläinen" <chaac@nic.fi>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Coding style / indent options
Date: Thu, 01 May 2008 22:02:02 +0300 [thread overview]
Message-ID: <481A13AA.1030405@nic.fi> (raw)
In-Reply-To: <20080429122218.3b2f66b7@gibibit.com>
Colin D Bennett wrote:
> Does anyone have a set of GNU indent (or astyle) options that correspond
> to the proper format for GRUB source code? I want to make sure I'm using
> the correct style so that I don't produce spurious changes when files
> I'm editing are reformatted.
>
> I tried using GNU indent (with the default GNU style) on a few GRUB 2
> source files to see what differences resulted, and I observed the
> following differences:
>
> GRUB GNU
> ==== ===
> (1) Space after unary '!' operator Yes No
> (2) Space between macro name and open paren No Yes
> (3) Max line length >=80 <80
> (4) Space between __attribute__ and parens No Yes
> (5) Keep indenting spaces on blank lines Yes No
>
> I did notice, however, that in some places (e.g.,
> normal/functions.c lines 84-87) the space/TAB usage is inconsistent). I
> assume that replacing 8 spaces with TAB characters is the desired
> usage (as GNU style suggests).
>
> I just want to keep the code I modify and produce as clean and uniform
> as possible, and produce clean patches.
Hi Colin,
As you noted it is not too strict :).
So best bet is to follow what you see elsewhere in GRUB 2 code base and
follow that. Of course one could argue should conventions be followed
more closely.
Just make it look clean and try to follow most of the rules. We will
spot them for you if we see the reason :)
It is usually a good idea to review contents of patches beforehand and
try to keep changes as minimal as possible.
Thanks,
Vesa Jääskeläinen
prev parent reply other threads:[~2008-05-01 19:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 19:22 Coding style / indent options Colin D Bennett
2008-05-01 19:02 ` Vesa Jääskeläinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=481A13AA.1030405@nic.fi \
--to=chaac@nic.fi \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.