[PATCH] checkpatch: Improve the TABSTOP test to include declarations

From: Joe Perches
Date: Fri Dec 22 2017 - 16:07:58 EST


Declarations should start on a tabstop too.

Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 168687ae24fa..9ecb70010661 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2988,7 +2988,7 @@ sub process {

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