scripts: checkpatch.pl
PATCH 1/1 scripts: checkpatch.pl
From: Raffaele Recalcati <[email protected]>
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.
--- scripts/checkpatch.pl | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
scripts/checkpatch.pl +7 -0
@@ -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)$/);
Signature · 1 line
1.7.0.4
PATCH 1/1 scripts: checkpatch.pl
From: Raffaele Recalcati <[email protected]>
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.
--- scripts/checkpatch.pl | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
scripts/checkpatch.pl +7 -0
@@ -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)$/);
Signature · 1 line
1.7.0.4
Quoted 7 lines · On Wed, 23 Jun 2010 11:49:21 +0200 Raffaele Recalcati <[email protected]>…
From: Raffaele Recalcati <[email protected]>
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 mean7e27d6e778cd87b6f2415515d7127eba53fe5d02commit.
I don't really understand that. It would help if the changelog were to include a copy of the code which triggers this "false positive", and a copy of the incorrect checkpatch output.
Thanks.
Quoted 22 lines
Signed-off-by Raffaele Recalcati <[email protected]>--- scripts/checkpatch.pl | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)scripts/checkpatch.pl +7
-0@@ -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)$/);
A message that is not in the archive (sent off-list or not yet received): [email protected]
Andy Whitcroft
maintainerQuoted 20 lines · Raffaele Recalcati
2010/6/23 Andrew Morton <[email protected]>
Quoted 11 lines
Quoted 7 lines · On Wed, 23 Jun 2010 11:49:21 +0200 Raffaele Recalcati <[email protected]>…
From: Raffaele Recalcati <[email protected]>
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 mean7e27d6e778cd87b6f2415515d7127eba53fe5d02commit.Quoted 7 lines
I don't really understand that. It would help if the changelog were to include a copy of the code which triggers this "false positive", and a copy of the incorrect checkpatch.pl output.
Thanks.
Quoted 7 lines
Would be nice a changelog like this?
----start changelog-----------
I've got a false positive when spaces are present at the beginning of a line.
So I add this check, obviously excluding to check the lines in the middle of comments.
This check seems to be causing regressions for valid combinations. I have a patch to this patch which seems to fix it, I am currently fixing the test suite and test it generally.
Andrew, will get the delta up to you shortly.
-apw