* [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
@ 2011-08-18 6:48 Jeff Kirsher
2011-08-18 7:26 ` Joe Perches
0 siblings, 1 reply; 13+ messages in thread
From: Jeff Kirsher @ 2011-08-18 6:48 UTC (permalink / raw)
To: linux-kernel
Cc: Bruce Allan, Joe Perches, Anish Kumar, Andy Whitcroft,
Jeff Kirsher
From: Bruce Allan <bruce.w.allan@intel.com>
Commit 2011247 introduced additional style checks for signature tags in
patches which is good. Unfortunately, now whenever patches are checked
by piping the output of 'git show' or 'stg show' through checkpatch it
warns not to use whitespace before all signature tags since these (and the
rest of the patch description) are indented. Remove this test/warning.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Cc: Joe Perches <joe@perches.com>
Cc: Anish Kumar <anish198519851985@gmail.com>
Cc: Andy Whitcroft <apw@canonical.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
scripts/checkpatch.pl | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9d761c9..a2a205a 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1539,17 +1539,12 @@ sub process {
}
# Check signature styles
- if ($line =~ /^(\s*)($signature_tags)(\s*)(.*)/) {
- my $space_before = $1;
- my $sign_off = $2;
- my $space_after = $3;
- my $email = $4;
+ if ($line =~ /^\s*($signature_tags)(\s*)(.*)/) {
+ my $sign_off = $1;
+ my $space_after = $2;
+ my $email = $3;
my $ucfirst_sign_off = ucfirst(lc($sign_off));
- if (defined $space_before && $space_before ne "") {
- WARN("BAD_SIGN_OFF",
- "Do not use whitespace before $ucfirst_sign_off\n" . $herecurr);
- }
if ($sign_off =~ /-by:$/i && $sign_off ne $ucfirst_sign_off) {
WARN("BAD_SIGN_OFF",
"'$ucfirst_sign_off' is the preferred signature form\n" . $herecurr);
--
1.7.6
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
2011-08-18 6:48 [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags Jeff Kirsher
@ 2011-08-18 7:26 ` Joe Perches
2011-08-18 7:47 ` Jeff Kirsher
0 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2011-08-18 7:26 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: linux-kernel, Bruce Allan, Anish Kumar, Andy Whitcroft
On Wed, 2011-08-17 at 23:48 -0700, Jeff Kirsher wrote:
> From: Bruce Allan <bruce.w.allan@intel.com>
>
> Commit 2011247 introduced additional style checks for signature tags in
> patches which is good. Unfortunately, now whenever patches are checked
> by piping the output of 'git show' or 'stg show' through checkpatch it
> warns not to use whitespace before all signature tags since these (and the
> rest of the patch description) are indented. Remove this test/warning.
I think this is not a good idea.
checkpatch is meant for patches not git log output.
indenting signatures can cause other problems later.
I think you can avoid this easily by using checkpatch
option --ignore=BAD_SIGN_OFF when using git log output
as input.
You could also use:
git log --format="commit %H%nAuthor: %an <%ae>%nDate: %aD%n%n%s%n%n%b"
so that you get the current default --format=medium
output without indenting the commit log body.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
2011-08-18 7:26 ` Joe Perches
@ 2011-08-18 7:47 ` Jeff Kirsher
2011-08-18 7:59 ` Joe Perches
0 siblings, 1 reply; 13+ messages in thread
From: Jeff Kirsher @ 2011-08-18 7:47 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel@vger.kernel.org, Allan, Bruce W, Anish Kumar,
Andy Whitcroft
[-- Attachment #1: Type: text/plain, Size: 1581 bytes --]
On Thu, 2011-08-18 at 00:26 -0700, Joe Perches wrote:
> On Wed, 2011-08-17 at 23:48 -0700, Jeff Kirsher wrote:
> > From: Bruce Allan <bruce.w.allan@intel.com>
> >
> > Commit 2011247 introduced additional style checks for signature tags in
> > patches which is good. Unfortunately, now whenever patches are checked
> > by piping the output of 'git show' or 'stg show' through checkpatch it
> > warns not to use whitespace before all signature tags since these (and the
> > rest of the patch description) are indented. Remove this test/warning.
>
> I think this is not a good idea.
>
> checkpatch is meant for patches not git log output.
> indenting signatures can cause other problems later.
>
> I think you can avoid this easily by using checkpatch
> option --ignore=BAD_SIGN_OFF when using git log output
> as input.
The problem I have with this is that the sign-off's are not bad, they
are by default indented by 'git show' or 'stg show' so checkpatch.pl
should handle the "default" formatting of git/stg and if there is
additional indenting not expected, then the sign-off's should be
considered bad. If this option is added, then if there were "real"
problems with the sign-off, it would not be displayed.
>
> You could also use:
>
> git log --format="commit %H%nAuthor: %an <%ae>%nDate: %aD%n%n%s%n%n%b"
>
> so that you get the current default --format=medium
> output without indenting the commit log body.
>
>
Even doing this does not resolve the "false" warnings" that
checkpatch.pl produces regarding the sign-off's.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
2011-08-18 7:47 ` Jeff Kirsher
@ 2011-08-18 7:59 ` Joe Perches
2011-08-18 8:07 ` Jeff Kirsher
` (2 more replies)
0 siblings, 3 replies; 13+ messages in thread
From: Joe Perches @ 2011-08-18 7:59 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: linux-kernel@vger.kernel.org, Allan, Bruce W, Anish Kumar,
Andy Whitcroft
On Thu, 2011-08-18 at 00:47 -0700, Jeff Kirsher wrote:
> On Thu, 2011-08-18 at 00:26 -0700, Joe Perches wrote:
> > On Wed, 2011-08-17 at 23:48 -0700, Jeff Kirsher wrote:
> > > From: Bruce Allan <bruce.w.allan@intel.com>
> > >
> > > Commit 2011247 introduced additional style checks for signature tags in
> > > patches which is good. Unfortunately, now whenever patches are checked
> > > by piping the output of 'git show' or 'stg show' through checkpatch it
> > > warns not to use whitespace before all signature tags since these (and the
> > > rest of the patch description) are indented. Remove this test/warning.
> >
> > I think this is not a good idea.
> >
> > checkpatch is meant for patches not git log output.
> > indenting signatures can cause other problems later.
> >
> > I think you can avoid this easily by using checkpatch
> > option --ignore=BAD_SIGN_OFF when using git log output
> > as input.
>
> The problem I have with this is that the sign-off's are not bad, they
> are by default indented by 'git show' or 'stg show' so checkpatch.pl
> should handle the "default" formatting of git/stg and if there is
> additional indenting not expected, then the sign-off's should be
> considered bad.
I disagree.
checkpatch should handle the default input of patches
as best it can.
I suppose checkpatch could have a different "--input=git"
or some such to avoid certain things that git might produce
that a patch would not.
Deleting useful checks for patches isn't a good idea.
> If this option is added, then if there were "real"
> problems with the sign-off, it would not be displayed.
So what?
It would also be too late to do anything about
it anyway as it would already be committed.
> > You could also use:
> > git log --format="commit %H%nAuthor: %an <%ae>%nDate: %aD%n%n%s%n%n%b"
> > so that you get the current default --format=medium
> > output without indenting the commit log body.
> Even doing this does not resolve the "false" warnings" that
> checkpatch.pl produces regarding the sign-off's.
I tried it. It works for me.
What about it doesn't work for you?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
2011-08-18 7:59 ` Joe Perches
@ 2011-08-18 8:07 ` Jeff Kirsher
2011-08-18 8:16 ` Joe Perches
2011-08-18 8:16 ` Jeff Kirsher
2011-08-19 14:13 ` Michal Marek
2 siblings, 1 reply; 13+ messages in thread
From: Jeff Kirsher @ 2011-08-18 8:07 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel@vger.kernel.org, Allan, Bruce W, Anish Kumar,
Andy Whitcroft
[-- Attachment #1: Type: text/plain, Size: 3967 bytes --]
On Thu, 2011-08-18 at 00:59 -0700, Joe Perches wrote:
> On Thu, 2011-08-18 at 00:47 -0700, Jeff Kirsher wrote:
> > On Thu, 2011-08-18 at 00:26 -0700, Joe Perches wrote:
> > > On Wed, 2011-08-17 at 23:48 -0700, Jeff Kirsher wrote:
> > > > From: Bruce Allan <bruce.w.allan@intel.com>
> > > >
> > > > Commit 2011247 introduced additional style checks for signature tags in
> > > > patches which is good. Unfortunately, now whenever patches are checked
> > > > by piping the output of 'git show' or 'stg show' through checkpatch it
> > > > warns not to use whitespace before all signature tags since these (and the
> > > > rest of the patch description) are indented. Remove this test/warning.
> > >
> > > I think this is not a good idea.
> > >
> > > checkpatch is meant for patches not git log output.
> > > indenting signatures can cause other problems later.
> > >
> > > I think you can avoid this easily by using checkpatch
> > > option --ignore=BAD_SIGN_OFF when using git log output
> > > as input.
> >
> > The problem I have with this is that the sign-off's are not bad, they
> > are by default indented by 'git show' or 'stg show' so checkpatch.pl
> > should handle the "default" formatting of git/stg and if there is
> > additional indenting not expected, then the sign-off's should be
> > considered bad.
>
> I disagree.
>
> checkpatch should handle the default input of patches
> as best it can.
>
> I suppose checkpatch could have a different "--input=git"
> or some such to avoid certain things that git might produce
> that a patch would not.
That does sound an alternative which would be acceptable.
>
> Deleting useful checks for patches isn't a good idea.
>
> > If this option is added, then if there were "real"
> > problems with the sign-off, it would not be displayed.
>
> So what?
>
> It would also be too late to do anything about
> it anyway as it would already be committed.
If you are running it on patches already committed to maintainers tree,
but if you are running checkpatch.pl on a patch on your local tree
before you send it out, you can correct any changes necessary.
>
> > > You could also use:
> > > git log --format="commit %H%nAuthor: %an <%ae>%nDate: %aD%n%n%s%n%n%b"
> > > so that you get the current default --format=medium
> > > output without indenting the commit log body.
> > Even doing this does not resolve the "false" warnings" that
> > checkpatch.pl produces regarding the sign-off's.
>
> I tried it. It works for me.
> What about it doesn't work for you?
>
I did the following using David Miller's net-next tree...
git log -1 > ../test.patch
./scripts/checkpatch.pl ../test.patch
and I get the following:
WARNING: Do not use whitespace before Signed-off-by:
#9:
Signed-off-by: Robin Holt <holt@sgi.com>
WARNING: Do not use whitespace before Acked-by:
#10:
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>,
WARNING: Do not use whitespace before Acked-by:
#11:
Acked-by: Wolfgang Grandegger <wg@grandegger.com>,
WARNING: Do not use whitespace before Cc:
#12:
Cc: U Bhaskar-B22300 <B22300@freescale.com>
WARNING: Do not use whitespace before Cc:
#13:
Cc: socketcan-core@lists.berlios.de,
WARNING: Do not use whitespace before Cc:
#14:
Cc: netdev@vger.kernel.org,
WARNING: Do not use whitespace before Cc:
#15:
Cc: PPC list <linuxppc-dev@lists.ozlabs.org>
WARNING: Do not use whitespace before Cc:
#16:
Cc: Kumar Gala <galak@kernel.crashing.org>
WARNING: Do not use whitespace before Signed-off-by:
#17:
Signed-off-by: David S. Miller <davem@davemloft.net>
ERROR: Does not appear to be a unified-diff format patch
total: 1 errors, 9 warnings, 0 lines checked
../test.patch has style problems, please review.
If any of these errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
2011-08-18 8:07 ` Jeff Kirsher
@ 2011-08-18 8:16 ` Joe Perches
2011-08-18 8:26 ` Jeff Kirsher
0 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2011-08-18 8:16 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: linux-kernel@vger.kernel.org, Allan, Bruce W, Anish Kumar,
Andy Whitcroft
On Thu, 2011-08-18 at 01:07 -0700, Jeff Kirsher wrote:
> On Thu, 2011-08-18 at 00:59 -0700, Joe Perches wrote:
> > On Thu, 2011-08-18 at 00:47 -0700, Jeff Kirsher wrote:
> > > On Thu, 2011-08-18 at 00:26 -0700, Joe Perches wrote:
> > > > On Wed, 2011-08-17 at 23:48 -0700, Jeff Kirsher wrote:
> > > > > From: Bruce Allan <bruce.w.allan@intel.com>
> > > > >
> > > > > Commit 2011247 introduced additional style checks for signature tags in
> > > > > patches which is good. Unfortunately, now whenever patches are checked
> > > > > by piping the output of 'git show' or 'stg show' through checkpatch it
> > > > > warns not to use whitespace before all signature tags since these (and the
> > > > > rest of the patch description) are indented. Remove this test/warning.
> > > >
> > > > I think this is not a good idea.
> > > >
> > > > checkpatch is meant for patches not git log output.
> > > > indenting signatures can cause other problems later.
> > > >
> > > > I think you can avoid this easily by using checkpatch
> > > > option --ignore=BAD_SIGN_OFF when using git log output
> > > > as input.
> > >
> > > The problem I have with this is that the sign-off's are not bad, they
> > > are by default indented by 'git show' or 'stg show' so checkpatch.pl
> > > should handle the "default" formatting of git/stg and if there is
> > > additional indenting not expected, then the sign-off's should be
> > > considered bad.
> >
> > I disagree.
> >
> > checkpatch should handle the default input of patches
> > as best it can.
> >
> > I suppose checkpatch could have a different "--input=git"
> > or some such to avoid certain things that git might produce
> > that a patch would not.
>
> That does sound an alternative which would be acceptable.
>
> >
> > Deleting useful checks for patches isn't a good idea.
> >
> > > If this option is added, then if there were "real"
> > > problems with the sign-off, it would not be displayed.
> >
> > So what?
> >
> > It would also be too late to do anything about
> > it anyway as it would already be committed.
>
> If you are running it on patches already committed to maintainers tree,
> but if you are running checkpatch.pl on a patch on your local tree
> before you send it out, you can correct any changes necessary.
>
> >
> > > > You could also use:
> > > > git log --format="commit %H%nAuthor: %an <%ae>%nDate: %aD%n%n%s%n%n%b"
> > > > so that you get the current default --format=medium
> > > > output without indenting the commit log body.
> > > Even doing this does not resolve the "false" warnings" that
> > > checkpatch.pl produces regarding the sign-off's.
> >
> > I tried it. It works for me.
> > What about it doesn't work for you?
> >
>
> I did the following using David Miller's net-next tree...
>
> git log -1 > ../test.patch
> ./scripts/checkpatch.pl ../test.patch
>
> and I get the following:
> WARNING: Do not use whitespace before Signed-off-by:
> #9:
> Signed-off-by: Robin Holt <holt@sgi.com>
Dull.
You didn't do what I suggested, and you aren't
checking the actual patch for the commit.
Try:
$ git log --format="commit %H%nAuthor: %an <%ae>%nDate: %aD%n%n%s%n%n%b" \
-p -1 master | ./scripts/checkpatch.pl -
total: 0 errors, 0 warnings, 826 lines checked
Your patch has no obvious style problems and is ready for submission.
(btw: checkpatch accepts input from standard input if you use a trailing "-")
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
2011-08-18 7:59 ` Joe Perches
2011-08-18 8:07 ` Jeff Kirsher
@ 2011-08-18 8:16 ` Jeff Kirsher
2011-08-19 14:13 ` Michal Marek
2 siblings, 0 replies; 13+ messages in thread
From: Jeff Kirsher @ 2011-08-18 8:16 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel@vger.kernel.org, Allan, Bruce W, Anish Kumar,
Andy Whitcroft
[-- Attachment #1: Type: text/plain, Size: 2799 bytes --]
On Thu, 2011-08-18 at 00:59 -0700, Joe Perches wrote:
> On Thu, 2011-08-18 at 00:47 -0700, Jeff Kirsher wrote:
> > On Thu, 2011-08-18 at 00:26 -0700, Joe Perches wrote:
> > > On Wed, 2011-08-17 at 23:48 -0700, Jeff Kirsher wrote:
> > > > From: Bruce Allan <bruce.w.allan@intel.com>
> > > >
> > > > Commit 2011247 introduced additional style checks for signature tags in
> > > > patches which is good. Unfortunately, now whenever patches are checked
> > > > by piping the output of 'git show' or 'stg show' through checkpatch it
> > > > warns not to use whitespace before all signature tags since these (and the
> > > > rest of the patch description) are indented. Remove this test/warning.
> > >
> > > I think this is not a good idea.
> > >
> > > checkpatch is meant for patches not git log output.
> > > indenting signatures can cause other problems later.
> > >
> > > I think you can avoid this easily by using checkpatch
> > > option --ignore=BAD_SIGN_OFF when using git log output
> > > as input.
> >
> > The problem I have with this is that the sign-off's are not bad, they
> > are by default indented by 'git show' or 'stg show' so checkpatch.pl
> > should handle the "default" formatting of git/stg and if there is
> > additional indenting not expected, then the sign-off's should be
> > considered bad.
>
> I disagree.
>
> checkpatch should handle the default input of patches
> as best it can.
>
> I suppose checkpatch could have a different "--input=git"
> or some such to avoid certain things that git might produce
> that a patch would not.
>
> Deleting useful checks for patches isn't a good idea.
>
> > If this option is added, then if there were "real"
> > problems with the sign-off, it would not be displayed.
>
> So what?
>
> It would also be too late to do anything about
> it anyway as it would already be committed.
To add...
Specifically, most maintainers ask developers to run checkpatch.pl on
their patches before submitting them to the community. As part of our
patch validation process, our validation team runs checkpatch.pl on
every patch I submit and we are now getting constant warnings about good
sign-off's with this recent change. I personally end up reviewing all
the warnings to ensure that they are false warnings and not "real"
issues with the sign-off's.
>
> > > You could also use:
> > > git log --format="commit %H%nAuthor: %an <%ae>%nDate: %aD%n%n%s%n%n%b"
> > > so that you get the current default --format=medium
> > > output without indenting the commit log body.
> > Even doing this does not resolve the "false" warnings" that
> > checkpatch.pl produces regarding the sign-off's.
>
> I tried it. It works for me.
> What about it doesn't work for you?
>
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
2011-08-18 8:16 ` Joe Perches
@ 2011-08-18 8:26 ` Jeff Kirsher
2011-08-18 8:31 ` Joe Perches
0 siblings, 1 reply; 13+ messages in thread
From: Jeff Kirsher @ 2011-08-18 8:26 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel@vger.kernel.org, Allan, Bruce W, Anish Kumar,
Andy Whitcroft
[-- Attachment #1: Type: text/plain, Size: 4044 bytes --]
On Thu, 2011-08-18 at 01:16 -0700, Joe Perches wrote:
> On Thu, 2011-08-18 at 01:07 -0700, Jeff Kirsher wrote:
> > On Thu, 2011-08-18 at 00:59 -0700, Joe Perches wrote:
> > > On Thu, 2011-08-18 at 00:47 -0700, Jeff Kirsher wrote:
> > > > On Thu, 2011-08-18 at 00:26 -0700, Joe Perches wrote:
> > > > > On Wed, 2011-08-17 at 23:48 -0700, Jeff Kirsher wrote:
> > > > > > From: Bruce Allan <bruce.w.allan@intel.com>
> > > > > >
> > > > > > Commit 2011247 introduced additional style checks for signature tags in
> > > > > > patches which is good. Unfortunately, now whenever patches are checked
> > > > > > by piping the output of 'git show' or 'stg show' through checkpatch it
> > > > > > warns not to use whitespace before all signature tags since these (and the
> > > > > > rest of the patch description) are indented. Remove this test/warning.
> > > > >
> > > > > I think this is not a good idea.
> > > > >
> > > > > checkpatch is meant for patches not git log output.
> > > > > indenting signatures can cause other problems later.
> > > > >
> > > > > I think you can avoid this easily by using checkpatch
> > > > > option --ignore=BAD_SIGN_OFF when using git log output
> > > > > as input.
> > > >
> > > > The problem I have with this is that the sign-off's are not bad, they
> > > > are by default indented by 'git show' or 'stg show' so checkpatch.pl
> > > > should handle the "default" formatting of git/stg and if there is
> > > > additional indenting not expected, then the sign-off's should be
> > > > considered bad.
> > >
> > > I disagree.
> > >
> > > checkpatch should handle the default input of patches
> > > as best it can.
> > >
> > > I suppose checkpatch could have a different "--input=git"
> > > or some such to avoid certain things that git might produce
> > > that a patch would not.
> >
> > That does sound an alternative which would be acceptable.
> >
> > >
> > > Deleting useful checks for patches isn't a good idea.
> > >
> > > > If this option is added, then if there were "real"
> > > > problems with the sign-off, it would not be displayed.
> > >
> > > So what?
> > >
> > > It would also be too late to do anything about
> > > it anyway as it would already be committed.
> >
> > If you are running it on patches already committed to maintainers tree,
> > but if you are running checkpatch.pl on a patch on your local tree
> > before you send it out, you can correct any changes necessary.
> >
> > >
> > > > > You could also use:
> > > > > git log --format="commit %H%nAuthor: %an <%ae>%nDate: %aD%n%n%s%n%n%b"
> > > > > so that you get the current default --format=medium
> > > > > output without indenting the commit log body.
> > > > Even doing this does not resolve the "false" warnings" that
> > > > checkpatch.pl produces regarding the sign-off's.
> > >
> > > I tried it. It works for me.
> > > What about it doesn't work for you?
> > >
> >
> > I did the following using David Miller's net-next tree...
> >
> > git log -1 > ../test.patch
> > ./scripts/checkpatch.pl ../test.patch
> >
> > and I get the following:
> > WARNING: Do not use whitespace before Signed-off-by:
> > #9:
> > Signed-off-by: Robin Holt <holt@sgi.com>
>
> Dull.
>
> You didn't do what I suggested, and you aren't
> checking the actual patch for the commit.
>
> Try:
>
> $ git log --format="commit %H%nAuthor: %an <%ae>%nDate: %aD%n%n%s%n%n%b" \
> -p -1 master | ./scripts/checkpatch.pl -
> total: 0 errors, 0 warnings, 826 lines checked
>
> Your patch has no obvious style problems and is ready for submission.
>
> (btw: checkpatch accepts input from standard input if you use a trailing "-")
>
>
I understand what you saying and asking, my point here is the that the
"default" style should be understood by checkpatch.pl and not produce
false warnings.
Sorry my example showed the long way of doing it, I get the same errors
if I were to simply do:
git log -1 | ./scripts/checkpatch.pl -
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
2011-08-18 8:26 ` Jeff Kirsher
@ 2011-08-18 8:31 ` Joe Perches
2011-08-18 8:43 ` Jeff Kirsher
0 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2011-08-18 8:31 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: linux-kernel@vger.kernel.org, Allan, Bruce W, Anish Kumar,
Andy Whitcroft
On Thu, 2011-08-18 at 01:26 -0700, Jeff Kirsher wrote:
> I understand what you saying and asking, my point here is the that the
> "default" style should be understood by checkpatch.pl and not produce
> false warnings.
And I still disagree.
checkpatch should consider whatever
input it gets as if it's a patch.
So, if you really want to feed
git log output as input to checkpatch
you should format that output
appropriately and the best way to do
that is to use git log --format=etc.
Don't suggest removing useful checks.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
2011-08-18 8:31 ` Joe Perches
@ 2011-08-18 8:43 ` Jeff Kirsher
2011-08-18 8:56 ` Joe Perches
0 siblings, 1 reply; 13+ messages in thread
From: Jeff Kirsher @ 2011-08-18 8:43 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel@vger.kernel.org, Allan, Bruce W, Anish Kumar,
Andy Whitcroft
[-- Attachment #1: Type: text/plain, Size: 864 bytes --]
On Thu, 2011-08-18 at 01:31 -0700, Joe Perches wrote:
> On Thu, 2011-08-18 at 01:26 -0700, Jeff Kirsher wrote:
> > I understand what you saying and asking, my point here is the that the
> > "default" style should be understood by checkpatch.pl and not produce
> > false warnings.
>
> And I still disagree.
>
> checkpatch should consider whatever
> input it gets as if it's a patch.
>
> So, if you really want to feed
> git log output as input to checkpatch
> you should format that output
> appropriately and the best way to do
> that is to use git log --format=etc.
>
> Don't suggest removing useful checks.
>
I understand what your saying, and I think that your suggestion about
possibly implementing a "--input=git" option to checkpatch.pl might be a
happy middle ground to resolve the numerous false warnings this check
produces.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
2011-08-18 8:43 ` Jeff Kirsher
@ 2011-08-18 8:56 ` Joe Perches
2011-08-18 9:21 ` Jeff Kirsher
0 siblings, 1 reply; 13+ messages in thread
From: Joe Perches @ 2011-08-18 8:56 UTC (permalink / raw)
To: jeffrey.t.kirsher
Cc: linux-kernel@vger.kernel.org, Allan, Bruce W, Anish Kumar,
Andy Whitcroft
On Thu, 2011-08-18 at 01:43 -0700, Jeff Kirsher wrote:
> I understand what your saying, and I think that your suggestion about
> possibly implementing a "--input=git" option to checkpatch.pl might be a
> happy middle ground to resolve the numerous false warnings this check
> produces.
As far as I can tell, --ignore= suffices.
If you really want to use checkpatch for checking
already committed patches, maybe you should not
use git log but use git format-patch instead.
$ git format-patch -1 --stdout | ./scripts/checkpatch.pl -
That works without any problems.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
2011-08-18 8:56 ` Joe Perches
@ 2011-08-18 9:21 ` Jeff Kirsher
0 siblings, 0 replies; 13+ messages in thread
From: Jeff Kirsher @ 2011-08-18 9:21 UTC (permalink / raw)
To: Joe Perches
Cc: linux-kernel@vger.kernel.org, Allan, Bruce W, Anish Kumar,
Andy Whitcroft
[-- Attachment #1: Type: text/plain, Size: 833 bytes --]
On Thu, 2011-08-18 at 01:56 -0700, Joe Perches wrote:
> On Thu, 2011-08-18 at 01:43 -0700, Jeff Kirsher wrote:
> > I understand what your saying, and I think that your suggestion about
> > possibly implementing a "--input=git" option to checkpatch.pl might be a
> > happy middle ground to resolve the numerous false warnings this check
> > produces.
>
> As far as I can tell, --ignore= suffices.
>
> If you really want to use checkpatch for checking
> already committed patches, maybe you should not
> use git log but use git format-patch instead.
>
> $ git format-patch -1 --stdout | ./scripts/checkpatch.pl -
>
> That works without any problems.
Thank you Joe, I will take a look at how we validate patches with
checkpatch.pl and hopefully we can reduce the time I take reviewing
checkpatch.pl warnings.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags
2011-08-18 7:59 ` Joe Perches
2011-08-18 8:07 ` Jeff Kirsher
2011-08-18 8:16 ` Jeff Kirsher
@ 2011-08-19 14:13 ` Michal Marek
2 siblings, 0 replies; 13+ messages in thread
From: Michal Marek @ 2011-08-19 14:13 UTC (permalink / raw)
To: Joe Perches
Cc: jeffrey.t.kirsher, linux-kernel@vger.kernel.org, Allan, Bruce W,
Anish Kumar, Andy Whitcroft
On 18.8.2011 09:59, Joe Perches wrote:
>>>> From: Bruce Allan <bruce.w.allan@intel.com>
>>>> Unfortunately, now whenever patches are checked
>>>> by piping the output of 'git show' or 'stg show' through checkpatch it
>>>> warns not to use whitespace before all signature tags since these (and the
>>>> rest of the patch description) are indented. Remove this test/warning.
...
>
> I suppose checkpatch could have a different "--input=git"
> or some such to avoid certain things that git might produce
> that a patch would not.
One can also use 'git show --pretty=email', which does not do the
indentation.
Michal
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2011-08-19 14:13 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-18 6:48 [PATCH] checkpatch: do not test/warn of leading whitespace before signature tags Jeff Kirsher
2011-08-18 7:26 ` Joe Perches
2011-08-18 7:47 ` Jeff Kirsher
2011-08-18 7:59 ` Joe Perches
2011-08-18 8:07 ` Jeff Kirsher
2011-08-18 8:16 ` Joe Perches
2011-08-18 8:26 ` Jeff Kirsher
2011-08-18 8:31 ` Joe Perches
2011-08-18 8:43 ` Jeff Kirsher
2011-08-18 8:56 ` Joe Perches
2011-08-18 9:21 ` Jeff Kirsher
2011-08-18 8:16 ` Jeff Kirsher
2011-08-19 14:13 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox