Code Formatter for STYLE(9)?

Matthew Seaman matthew at FreeBSD.org
Thu Mar 24 14:55:10 UTC 2016


On 2016/03/24 13: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.
> 

pkg uses uncrustify with this config file:

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

It's approximately what style(9) describes but doesn't cover things like
sorting include files and I don't think it was updated in response to
the recent change allowing { brackets } around certain single-line
statements.

	Cheers,

	Matthew


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 972 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20160324/76e72104/attachment.sig>


More information about the freebsd-hackers mailing list