From 3b4fe6ecaa603faf78c42545354ae4e60659f267 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Tue, 26 Oct 2010 14:23:11 -0700 Subject: [PATCH] --- yaml --- r: 217581 b: refs/heads/master c: 6b4c5bebcebb0a48d29947e9aa749650751a7696 h: refs/heads/master i: 217579: c1878cbb82f95a813fb0c991eaf38fb0986186dc v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 1af004a259d8..f45dd242a9fd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 658716d19f8f155c67d4677ba68034b8e492dfbe +refs/heads/master: 6b4c5bebcebb0a48d29947e9aa749650751a7696 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 2039acdf5122..0a87c7417ada 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -1459,10 +1459,13 @@ sub process { } # check for spaces at the beginning of a line. - if ($rawline =~ /^\+ / && $rawline !~ /\+ +\*/) { +# Exceptions: +# 1) within comments +# 2) indented preprocessor commands +# 3) hanging labels + if ($rawline =~ /^\+ / && $line !~ /\+ *(?:$;|#|$Ident:)/) { my $herevet = "$here\n" . cat_vet($rawline) . "\n"; - WARN("please, no space for starting a line, \ - excluding comments\n" . $herevet); + WARN("please, no spaces at the start of a line\n" . $herevet); } # check we are in a valid C source file if not then ignore this hunk