[Parted-edge] [PATCH] Create the needed infra-structure to enforce the coding style

Jim Meyering jim at meyering.net
Fri Jul 6 12:08:19 UTC 2007


"Debarshi 'Rishi' Ray" <debarshi.ray at gmail.com> wrote:
>> indent --gnu-style
>>        --no-tabs
>>        -ppi 2
>>        --preserve-mtime
>> $(find . -iname '*.h' -o -iname '*.c' -o -iname '*.hpp' -o -iname
>> '*.cpp' -o -iname '*.cc')
>
> David, what do you think of the above to enforce an uniform coding
> style for the multi-language bindings code (bindings.git)? Apart from
> enforcing the GNU Coding Standards
> (http://www.gnu.org/prep/standards/standards.html) it replaces TABs
> with blankspaces, indents the pre-processor directives within
> #ifdef...#endif blocks, and preserves the file access and modification
> times.
>
> To avoid the current confusion in the parted.git code it would be
> better if we decided this before committing anything to bindings.git.

I like it.

If it's something you plan to run regularly, you can
make it more compact and a little more robust, e.g.
when names contain shell meta-characters:

  find . \( -iname '*.[ch]' -o -iname '*.[ch]pp' -o -iname '*.cc' \) -print0 \
    | xargs -0 indent --gnu-style --no-tabs -ppi 2 --preserve-mtime



More information about the Parted-edge mailing list