[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[dm-devel] Re: [PATCH] scripts/checkpatch.pl: Change long line warning to 105 chars
- From: Krzysztof Halasa <khc pm waw pl>
- To: Joe Perches <joe perches com>
- Cc: Valdis Kletnieks vt edu, linux-kernel vger kernel org, dm-devel redhat com, Paul Mundt <lethal linux-sh org>, Mikulas Patocka <mpatocka redhat com>, Andy Whitcroft <apw canonical com>, Andrew Morton <akpm linux-foundation org>, Linus Torvalds <torvalds linux-foundation org>, Alasdair G Kergon <agk redhat com>
- Subject: [dm-devel] Re: [PATCH] scripts/checkpatch.pl: Change long line warning to 105 chars
- Date: Fri, 18 Dec 2009 15:37:00 +0100
Joe Perches <joe perches com> writes:
> I think this is a good test to add to checkpatch.
>
> Add 105 character long line WARN test
Not sure if that's long enough (maybe it is).
132 looks like the next "natural" number.
The problematic case like printk(KERN_DEBUG "%s:%s:%s", var ? "yes" :
"no" and so on. If we split the code like that then better use 132 than
105 - even with 132 chars we may need to split, remember it's the printk
output which has to fit in 80 chars, or maybe usually has.
The main problem is checkpatch can't estimate "complexity". Fortunately
the reviewers can.
> Add 80 character long line STRICT test
Not sure what do you mean.
> Add 6+ leading indent tabs test, consider restructuring
This makes perfect sense, at least until shown otherwise (though being
a warning instead of an error means it's ok to trigger in perfectly
valid code).
--
Krzysztof Halasa
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]