Code Formatter for STYLE(9)?

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Mar 29 12:45:08 UTC 2016


On 24/03/16 21:25, Hans Petter Selasky wrote:
> On 03/24/16 14:29, Sebastian Huber wrote:
>> Hello,
>>
>> is there a ready to use C code formatter available that honours
>> STYLE(9)? I tried clang-format, but it knows only LLVM, Google,
>> Chromium, Mozilla by default. The GNU indent --original seems to produce
>> nothing usable. Same problem with astyle --style=bsd.
>>
>
> Hi,
>
> Maybe you want to contribute to:
>
> https://svnweb.freebsd.org/base/head/tools/tools/indent_wrapper
>
> It also supports diffs. 

I tried to use the FreeBSD indent with your configuration on a pretty 
badly formatted file, but it didn't work well. My hope was that someone 
has a configuration for the clang-format.

The uncrustify program seems to be quite capable, but would require 
additional support to cope with STYLE(9). At least using

https://github.com/freebsd/pkg/blob/master/freebsd.cfg


didn't yield a good result.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the freebsd-hackers mailing list