All of lore.kernel.org
 help / color / mirror / Atom feed
* [Q] Indentation rules for GRUB source code
@ 2012-03-01 12:09 Andreas Vogel
  2012-03-01 12:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Vogel @ 2012-03-01 12:09 UTC (permalink / raw)
  To: The development of GNU GRUB

I tried to find all relevant docs and read what I've found (e.g.
grub-dev.texi), so please excuse me if this questions has been already
answered somewhere.

I would like to change and submit code for GRUB and from what i see
right now indentation of the code doesn't seem to follow any rules. Most
of the time the visible indentation is 2 spaces which is either achieved
by using a TAB (which needs that the editor is configured to show TABs
as 2 spaces) or it's done by just using 2 spaces.

Regarding to what code I've seen until now, the indentation of quite a
lot of code is messed up and makes reading more difficult.

What are the preferred rules to follow when submitting changes or new
code regarding indentation?

BTW, it might be a good idea to propose the TAB setting configurations
for the most popular editors, e.g. I'm using vim right now.

Andreas


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Q] Indentation rules for GRUB source code
  2012-03-01 12:09 [Q] Indentation rules for GRUB source code Andreas Vogel
@ 2012-03-01 12:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
  2012-03-01 13:28   ` Andreas Vogel
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-03-01 12:25 UTC (permalink / raw)
  To: grub-devel

On 01.03.2012 13:09, Andreas Vogel wrote:
> I tried to find all relevant docs and read what I've found (e.g.
> grub-dev.texi), so please excuse me if this questions has been already
> answered somewhere.
>
> I would like to change and submit code for GRUB and from what i see
> right now indentation of the code doesn't seem to follow any rules. Most
> of the time the visible indentation is 2 spaces which is either achieved
> by using a TAB (which needs that the editor is configured to show TABs
> as 2 spaces) or it's done by just using 2 spaces.
We use GNU identation as described in GCS 
(http://www.gnu.org/prep/standards/)
and as is the default in emacs and "indent" except some imported code 
which may follow other modes for practical reasons
>
> Regarding to what code I've seen until now, the indentation of quite a
> lot of code is messed up and makes reading more difficult.
Displays fine here in emacs
> What are the preferred rules to follow when submitting changes or new
> code regarding indentation?
Run indent on all new code.
>
> BTW, it might be a good idea to propose the TAB setting configurations
> for the most popular editors, e.g. I'm using vim right now.
it's the standard GNU one.
> Andreas
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Q] Indentation rules for GRUB source code
  2012-03-01 12:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2012-03-01 13:28   ` Andreas Vogel
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Vogel @ 2012-03-01 13:28 UTC (permalink / raw)
  To: The development of GNU GRUB

Thanks for clarification and the pointer to GCS.

Just for reference: the appropriate indentation setting for VIM is

     set tabstop=8 softtabstop=2 shiftwidth=2 noexpandtab

so that indentation is 2 spaces and each bunch of 8 spaces will be
converted into a TAB char.

Andreas


Am 01.03.2012 13:25, schrieb Vladimir 'φ-coder/phcoder' Serbinenko:
> On 01.03.2012 13:09, Andreas Vogel wrote:
>> I tried to find all relevant docs and read what I've found (e.g.
>> grub-dev.texi), so please excuse me if this questions has been already
>> answered somewhere.
>>
>> I would like to change and submit code for GRUB and from what i see
>> right now indentation of the code doesn't seem to follow any rules. Most
>> of the time the visible indentation is 2 spaces which is either achieved
>> by using a TAB (which needs that the editor is configured to show TABs
>> as 2 spaces) or it's done by just using 2 spaces.
> We use GNU identation as described in GCS
> (http://www.gnu.org/prep/standards/)
> and as is the default in emacs and "indent" except some imported code
> which may follow other modes for practical reasons
>>
>> Regarding to what code I've seen until now, the indentation of quite a
>> lot of code is messed up and makes reading more difficult.
> Displays fine here in emacs
>> What are the preferred rules to follow when submitting changes or new
>> code regarding indentation?
> Run indent on all new code.
>>
>> BTW, it might be a good idea to propose the TAB setting configurations
>> for the most popular editors, e.g. I'm using vim right now.
> it's the standard GNU one.
>> Andreas
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> https://lists.gnu.org/mailman/listinfo/grub-devel
>>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-01 13:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-01 12:09 [Q] Indentation rules for GRUB source code Andreas Vogel
2012-03-01 12:25 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-03-01 13:28   ` Andreas Vogel

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.