lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GOP-PROP 3: C++ formatting


From: Keith OHara
Subject: Re: GOP-PROP 3: C++ formatting
Date: Sun, 26 Jun 2011 18:12:07 -0700
User-agent: Opera Mail/11.11 (Win32)

On Sun, 26 Jun 2011 10:48:36 -0700, Graham Percival <address@hidden> wrote:

indent(1) can't handle C++ code.

That's surprising. Bummer.

From earlier,

A few specific problems with astyle:
    * it doesn’t indent enum in gnu style
 I can't find gnu instructions for indenting enums, but if there are any the 
astyle maintainers would probably want their gnu-mode to conform.

    * loses some nice comment formatting in ‘lily/axis-group-interface.cc’
 If you mean line 592, it is fixcc.py that did the bad deed (as it has already 
done elsewhere in master).  Astyle wins here.

The most unusual aspect of gnu style is the space before open parentheses.  It would be 
nice to reduce all the review comments about this space to "run the format tool 
before you commit or push".

In your tests it seems only fixcc added this space, but astyle -Udp can do it.

Actually, astyle -Ud  inserts space /after/ the last right parenthesis as well, 
when it is followed by another subexpression,
  foo ((array*) [dir]);  a = me -> grob ()->spanned_rank_interval () [RIGHT];
where Lilypond tends to have
  foo ((array*)[dir]);   a = me -> grob ()->spanned_rank_interval ()[RIGHT];




reply via email to

[Prev in Thread] Current Thread [Next in Thread]