Messages in this thread | | | From | (Eric W. Biederman) | Subject | Re: [PATCH] checkpatch: Warn on code with 6+ tab indentation | Date | Fri, 03 Feb 2012 18:40:19 -0800 |
| |
Joe Perches <joe@perches.com> writes:
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 2b52aeb..89d24b3 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -1924,6 +1924,12 @@ sub process { > my $pre_ctx = "$1$2"; > > my ($level, @ctx) = ctx_statement_level($linenr, $realcnt, 0); > + > + if ($line =~ /^\+\t{6,}/) { > + WARN("DEEP_INDENTATION", > + "Too many leading tabs - consider code refactoring\n" . $herecurr); > + }
By any chance have you run this patch against itself? I find it comical that there is a line 104 characters long suggesting people use shorter lines.
> my $ctx_cnt = $realcnt - $#ctx - 1; > my $ctx = join("\n", @ctx); >
Eric
| |