Skip to content

Commit a134f8d

Browse files
JoePerchestorvalds
authored andcommitted
checkpatch: improve the TABSTOP test to include declarations
Declarations should start on a tabstop too. Link: http://lkml.kernel.org/r/1b5f97673f36595956ad43329f77bf1a5546d2ff.1513976662.git.joe@perches.com Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 0018046 commit a134f8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/checkpatch.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3020,7 +3020,7 @@ sub process {
30203020

30213021
# check indentation starts on a tab stop
30223022
if ($^V && $^V ge 5.10.0 &&
3023-
$sline =~ /^\+\t+( +)(?:$c90_Keywords\b|\{\s*$|\}\s*(?:else\b|while\b|\s*$))/) {
3023+
$sline =~ /^\+\t+( +)(?:$c90_Keywords\b|\{\s*$|\}\s*(?:else\b|while\b|\s*$)|$Declare\s*$Ident\s*[;=\[])/) {
30243024
my $indent = length($1);
30253025
if ($indent % 8) {
30263026
if (WARN("TABSTOP",

0 commit comments

Comments
 (0)