All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] checkpatch: Make the 80-character limit a --strict check only
@ 2013-10-07 19:18 Josh Triplett
  2013-10-07 19:28 ` Joe Perches
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Josh Triplett @ 2013-10-07 19:18 UTC (permalink / raw)
  To: torvalds, gregkh, Andy Whitcroft, Joe Perches, linux-kernel

The 80-character limit is not a hard-and-fast rule, nor should it be
applied blindly by people running checkpatch and fixing its warnings.
Sometimes it's better to violate the 80-character "limit" in the name of
readability, and when it isn't, it's often better to refactor into a
function or otherwise restructure the code rather than just finding
increasingly awkward places to break lines.

Thus, change checkpatch's LONG_LINE warning to a --strict CHK instead.
Anyone wanting to use checkpatch to check for this can easily enough
enable --strict or turn on LONG_LINE explicitly, but it shouldn't be
part of the default warnings.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---

 scripts/checkpatch.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 47016c3..ed16a68 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2017,8 +2017,8 @@ sub process {
 		    $line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) &&
 		    $length > $max_line_length)
 		{
-			WARN("LONG_LINE",
-			     "line over $max_line_length characters\n" . $herecurr);
+			CHK("LONG_LINE",
+			    "line over $max_line_length characters\n" . $herecurr);
 		}
 
 # Check for user-visible strings broken across lines, which breaks the ability
-- 
1.8.4.rc3


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-10-08  4:14 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-07 19:18 [RFC PATCH] checkpatch: Make the 80-character limit a --strict check only Josh Triplett
2013-10-07 19:28 ` Joe Perches
2013-10-07 19:34   ` Josh Triplett
2013-10-07 19:38     ` Joe Perches
2013-10-08  2:08       ` Josh Triplett
2013-10-07 21:23     ` Al Viro
2013-10-07 21:33       ` Joe Perches
2013-10-07 21:41         ` Joe Perches
2013-10-07 19:50 ` Richard Weinberger
2013-10-07 21:40 ` Andi Kleen
2013-10-08  4:13 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.