Source Code Beautifier for C

Gedare Bloom gedare at rtems.org
Tue Dec 4 02:10:06 UTC 2012


Thanks I like the idea I'll have to check this tool out.


On Mon, Dec 3, 2012 at 3:37 PM, Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> Hello,
>
> I recently tested the Uncrustify source code beautifier.  It looks pretty
> promising.
>
> http://uncrustify.sourceforge.**net/ <http://uncrustify.sourceforge.net/>
>
> If you try it out please use the latest Git master since it contains some
> bug fixes that are not in the latest release.
>
> Attached is a configuration that is close to the RTEMS coding style.  I
> didn't use spaces after '(' and before ')'.  The options
>
> # Add or remove space inside if-condition '(' and ')'
> sp_inside_sparen                         = force   #
> ignore/add/remove/force
>
> # Add or remove space inside empty function '()'
> sp_inside_fparens                        = force   #
> ignore/add/remove/force
>
> # Add or remove space inside function '(' and ')'
> sp_inside_fparen                         = force   #
> ignore/add/remove/force
>
> would enable this.
>
> A good test to see how it works is this:
>
> uncrustify -c ~/git-rtems/contrib/**uncrustify/rtems.cfg -f
> cpukit/libfs/src/dosfs/msdos_**misc.c
>
> We can use this tool to format files before a big change.  The procedure
> would be to format the source code, make sure that the generated binary
> code is the same and then commit this.  Later we can do the actual
> functional changes.
>
> We can use also this configuration file as a formal source code format
> specification.
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
> Phone   : +49 89 18 90 80 79-6
> Fax     : +49 89 18 90 80 79-9
> E-Mail  : sebastian.huber at embedded-**brains.de<sebastian.huber at embedded-brains.de>
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20121203/0dfc7335/attachment-0001.html>


More information about the devel mailing list