lkml.org 
[lkml]   [2012]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] checkpatch: Warn on code with 6+ tab indentation
On Fri, Feb 3, 2012 at 7:21 PM, Joe Perches <joe@perches.com> wrote:
>
> I think that's a bad test.
> It finds a _lot_ of line continuations.
>
> The right test is _only_ for 6 or more tabs
> followed by (if|for|while|do|else|switch)

Fair enough.

And I have to admit that doing your grep with an additional -4 to see
some context does make a fairly strong argument for your patch.

The code in drivers/isdn/hisax/hfc_usb.c that triggers is absolutely
disgusting, and does crazy things due to the long lines.

As is some other code that grep shows.

In fact, I think that grep convinced me that you are right about this
particular pattern. Brr. Now I need to go dig my eyes out with a
spoon.

Linus

>
> $ grep -rP --include=*.[ch] "^\t{6,}(if|for|while|do|else|switch)" * | \
>  wc -l
> 1509
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-02-04 04:39    [W:0.061 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site