lkml.org 
[lkml]   [2012]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] checkpatch: Warn on code with 6+ tab indentation
On Fri, 3 Feb 2012 17:27:36 -0800 Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Fri, Feb 3, 2012 at 3:20 PM, Joe Perches <joe@perches.com> wrote:
> > Overly indented code should be refactored.
> >
> > Suggest refactoring excessive indentation of
> > of if/else/for/do/while/switch statements.
>
> I hate this patch.
>
> Why? Because mindless checks like this would just lead to people
> making things worse and intermixing spaces there instead.
>
> That's the same reason the 80-character check has been a total
> disaster. People shut it up by splitting long strings etc, and we've
> had to change that 80-character test many times just to avoid the
> crazy workarounds.
>
> Don't warn about things that will just result in people working around
> the warnings with worse code!
>

Sampling bias ;) You notice the 80-col fixups which resulted in
poor-looking code and not the fixups which resulted in decent-looking
code.



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