Re: [PATCH] checkpatch: Warn on code with 6+ tab indentation

From: Joe Perches
Date: Fri Feb 03 2012 - 20:34:16 EST


On Fri, 2012-02-03 at 17:27 -0800, Linus Torvalds wrote:
> On Fri, Feb 3, 2012 at 3:20 PM, Joe Perches <joe@xxxxxxxxxxx> wrote:
> > Overly indented code should be refactored.
> > Suggest refactoring excessive indentation of
> > of if/else/for/do/while/switch statements.
> I hate this patch.

You liked the same premise, but a worse
implementation, a couple years ago.
https://lkml.org/lkml/2009/12/18/289

> Why? Because mindless checks like this would just lead to people
> making things worse and intermixing spaces there instead.

Can't happen.
They'll get a different warning about mixing tabs
and spaces or starting a line with spaces only.

> Don't warn about things that will just result in people working around
> the warnings with worse code!

It merely suggests refactoring. ie: better code.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/