RFC: uncrustify vs clang-format

Eric S. Raymond esr at thyrsus.com
Fri Jan 13 17:09:45 UTC 2017


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>


More information about the devel mailing list