From 0dfcbd27b696943b3c6d294dca5bbd39827450ac Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Fri, 3 Feb 2012 15:20:39 -0800 Subject: [PATCH] --- yaml --- r: 287303 b: refs/heads/master c: 8eef05dd3e70233f3e391774d612dab44c3f023b h: refs/heads/master i: 287301: b9f7a38e979e7fd282c82b910b946f6cf3990610 287299: 7f12dddcee0be440789df4cc427b68981804c48a 287295: 6505319f15a83fab6dd1965036a89c367fd5a4f6 v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e8a581e43944..2b85cf9b24e0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6bd113f1f4a8c0d05c4dbadb300319e0e3526db4 +refs/heads/master: 8eef05dd3e70233f3e391774d612dab44c3f023b diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index e3bfcbe8a520..a3b9782441f9 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/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); + } + my $ctx_cnt = $realcnt - $#ctx - 1; my $ctx = join("\n", @ctx);