lkml.org 
[lkml]   [2014]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] scripts/checkpatch.pl: Only emit LONG_LINE for --strict
Regardless of the long-standing debate over line width, checkpatch
should not warn about it by default. Too many users run checkpatch and
blindly follow its recommendation by splitting long lines, which almost
invariably results in worse code. On rare occasions, the line-width
limit encourages sensible refactoring of nested code into functions, but
more frequently it just results in painfully over-wrapped code. Turning
this warning off by default will ensure that people who take the time to
fix up checkpatch issues in drivers (especially staging drivers) don't
waste time submitting patches that uglify code to quiet checkpatch's
line-width limit.

The on-by-default DEEP_INDENTATION warning for lines indented more than
6 levels deep makes more sense as a default, to encourage people to
refactor, since it cannot be "fixed" by simply reformatting code.

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 010b18e..b2eb968 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2146,8 +2146,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
--
2.0.0


\
 
 \ /
  Last update: 2014-06-26 02:01    [W:0.310 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site