Messages in this thread | | | Subject | Re: [PATCH] checkpatch: Warn on code with 6+ tab indentation | From | Joe Perches <> | Date | Fri, 03 Feb 2012 17:33:46 -0800 |
| |
On Fri, 2012-02-03 at 17:27 -0800, Linus Torvalds 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.
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.
| |