lkml.org 
[lkml]   [2010]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] scripts: checkpatch.pl
Date
From: Raffaele Recalcati <raffaele.recalcati@bticino.it>

I've got a false positive when spaces are present
at the beginning of a line.
So I add this check, obviously outside comments.
This patch is compatible with the actual mainline,
I mean 7e27d6e778cd87b6f2415515d7127eba53fe5d02 commit.

Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
---
scripts/checkpatch.pl | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a4d7434..315a827 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1433,6 +1433,13 @@ sub process {
WARN("please, no space before tabs\n" . $herevet);
}

+# check for spaces at the beginning of a line.
+ if ($rawline =~ /^\+ / && $rawline !~ /\+ +\*/) {
+ my $herevet = "$here\n" . cat_vet($rawline) . "\n";
+ WARN("please, no space for starting a line, \
+ excluding comments\n" . $herevet);
+ }
+
# check we are in a valid C source file if not then ignore this hunk
next if ($realfile !~ /\.(h|c)$/);

--
1.7.0.4


\
 
 \ /
  Last update: 2010-06-23 11:53    [W:0.044 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site