[Swan-dev] [Swan-commit] Changes to ref refs/heads/master

D. Hugh Redelmeier hugh at mimosa.com
Sat Mar 29 20:38:10 EET 2014


| From: Tuomo Soini <tis at foobar.fi>

| Uncrustify did wrong in these cases. It was supposed to use tabs only
| but it used tabs and spaces. First one is wrong if it includes use of
| spaces for indent. Tabs should be used and match as near as possible
| with tabs. And no, I'm not perfect either with these. But those I tried
| to fix included spaces for indent which is wrong.

"Descendants are always substantially shorter than the parent and
are placed substantially to the right."

That's all I see about breaking lines in
<https://www.kernel.org/doc/Documentation/CodingStyle>

I don't see anything about "match [open bracket of function call]
as near as possible".

I would like to stretch it.  Only indent one additional tabstop.
That's enough.  Approximations are neither fish nor fowl.

My suggested exception: if the thing after the broken bit will be
indented, you need to indent the broken bit differently to make it
visually distinct.  So, here's a way that can be done.

	if (a long test that goes on and on ||
			a wide test that goes on and on) {
		do_the_thing();
	}

(My preferred style, which we've rejected, is clearer still:
	if (a long test that goes on and on
	|| a wide test that goes on and on) {
		do_the_thing();
	}
Even more stark if you remove the braces.
)


More information about the Swan-dev mailing list