[gst-devel] indentation

David Schleef ds at schleef.org
Fri Mar 12 13:36:06 CET 2004


On Fri, Mar 12, 2004 at 01:46:09PM +0100, Thomas Vander Stichele wrote:
> I'm ready to commit the result of indenting GStreamer's source with
> Dave's indent line:
> 
>  indent  -br -bad -cbi0 -cli2 -bls -l80 -ut -ce -nlp -ci4 -hnl
> 
> The source looks better than I expected; apart from the fact that
> multiline statements look different than to what I'm used to (since it's
> not aligning function arguments anymore, for example), I'm quite fine
> with it.
> 
> The patch for the core alone is already 2MB.  Any last objections ? I
> want to do this now so I can set some of the other things in place like
> modelines in the source files, and precommit indent runs so nobody has
> to worry about getting it right and everything is automatic.

I think I discovered a few more options that better correspond to
our collective taste:

indent \
        --braces-on-if-line \
        --blank-lines-after-declarations \
        --case-brace-indentation0 \
        --case-indentation2 \
        --braces-after-struct-decl-line \
        --line-length80 \
        --use-tabs \
        --cuddle-else \
        --dont-line-up-parentheses \
        --continuation-indentation4 \
        --honour-newlines \
        --tab-size8 \
        --indent-level2 \
        $*

I think it's the same as above, but with the additional --indent-level2
and --tab-size8.

There are a few missing features in indent that would be nice, including
telling it to not ever use tabs.  That might be possible with
--tab-size100 or so, though.



dave...





More information about the gstreamer-devel mailing list