]> Pileus Git - ~andy/linux/blobdiff - scripts/checkpatch.pl
Btrfs: fix use-after-free in __btrfs_end_transaction
[~andy/linux] / scripts / checkpatch.pl
index e3bfcbe8a520b63639b04115bf148fb4ddd144eb..a3b9782441f9e49a3a3522107e40dc3ffee913b8 100755 (executable)
@@ -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);