RFC: uncrustify vs clang-format

Mark Atwood fallenpegasus at gmail.com
Fri Jan 13 20:15:20 UTC 2017


I think that the difference between uncrustify and clang-formatter is that
clang-formatter actually uses the clang parser, so it should be able to
injest any valid C.

But, it will be an interesting experiment.

..m

On Fri, Jan 13, 2017 at 9:09 AM Eric S. Raymond <esr at thyrsus.com> wrote:

> Mark Atwood <fallenpegasus at gmail.com>:
> > While I was reading up on uncrustify, opensource.com posted an article
> > about clang-format.
>
> Note that clang-format style is not a single thing; the tool takes
> parameters.
>
> I looked at the Wikipedia article on "Indent style".  There are more
> perversities out there than were dreamt of in my philosophy!
>
> I prefer what it calls Allman style. I could live with any of the 1TBS
> variants.  I mildly dislike Whitesmiths and Ratliff, somewhat more
> strongly dislike GNU, and don't want us going anywhere near Horstmann,
> Pico, or "Lisp" styles.
>
> But, as I said, I generally adapt to whatever style I find in place in
> a C codebase and don't try to impose my preferences.
>
> The most unusual trait of Mills style is exemplified by this function
> header:
>
> static void
> clock_update(
>         struct peer *peer       /* peer structure pointer */
>         )
> {
>
> I've never seen this way of laying out formal argument lists anywhere else.
> If we apply a formatter, we're going to have to first check what it does
> to these.
> --
>                 <a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170113/b796ae9d/attachment.html>


More information about the devel mailing list