Skip to contentSkip to conversation

checkpatch.pl WARNING: Do not use whitespace before Signed-off-by:

DISCUSSION Antti Palosaari 3 participants 8 messages Sep 5, 2011 – Sep 6, 2011 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

I am almost sure this have been working earlier, but now it seems like nothing is acceptable for checkpatch.pl! I did surely about 20 --amend and tried to remove everything, without luck. Could someone point out whats new acceptable logging format for checkpatch.pl ?

[crope@localhost linux]$ git show 1b19e42952963ae2a09a655f487de15b7c81c5b7 |./scripts/checkpatch.pl -
WARNING: Do not use whitespace before Signed-off-by:
#10:

WARNING: Do not use whitespace before Signed-off-by:
#11:

total: 0 errors, 2 warnings, 48 lines checked

Your patch has style problems, please review.

If any of these errors are false positives, please report them to the maintainer, see CHECKPATCH in MAINTAINERS.

Antti

Signature · 1 line
http://palosaari.fi/
#1 lore raw
Quoted 8 lines · Antti Palosaari

I am almost sure this have been working earlier, but now it seems like nothing is acceptable for checkpatch.pl! I did surely about 20 --amend and tried to remove everything, without luck. Could someone point out whats new acceptable logging format for checkpatch.pl ?

[crope@localhost linux]$ git show 1b19e42952963ae2a09a655f487de15b7c81c5b7 |./scripts/checkpatch.pl -
WARNING: Do not use whitespace before Signed-off-by:

Don't know if checkpatch used to accept that, but you can use "--format=email" to make it work with git show:

 bjorn@canardo:/usr/local/src/git/linux$ git show --format=email 1b19e42952963ae2a09a655f487de15b7c81c5b7|./scripts/checkpatch.pl -
 total: 0 errors, 0 warnings, 48 lines checked

Your patch has no obvious style problems and is ready for submission.

Bjørn

#2 lore raw
Quoted 11 lines · Bjørn Mork
Quoted 8 lines · Antti Palosaari

I am almost sure this have been working earlier, but now it seems like nothing is acceptable for checkpatch.pl! I did surely about 20 --amend and tried to remove everything, without luck. Could someone point out whats new acceptable logging format for checkpatch.pl ?

[crope@localhost linux]$ git show 1b19e42952963ae2a09a655f487de15b7c81c5b7 |./scripts/checkpatch.pl -
WARNING: Do not use whitespace before Signed-off-by:

Quoted 7 lines

Don't know if checkpatch used to accept that, but you can use "--format=email" to make it work with git show:

  bjorn@canardo:/usr/local/src/git/linux$ git show --format=email 1b19e42952963ae2a09a655f487de15b7c81c5b7|./scripts/checkpatch.pl -
  total: 0 errors, 0 warnings, 48 lines checked

Your patch has no obvious style problems and is ready for submission.

Yes, I found it. It was rather new patch adding more checks.
As a you pointed that can be workaround giving --format=email as a param for git show. But it is yet another "useless" param to remember...

So what is recommended way to ensure patch is correct currently?
a) before commit
b) after commit

commit 2011247550c1b903a9ecd68f6eb3e9e7b7b07f52

Author: Joe Perches <[email protected]>
Date:   Mon Jul 25 17:13:23 2011 -0700

checkpatch: validate signature styles and To: and Cc: lines

Signatures have many forms and can sometimes cause problems if not
in the
correct format when using git send-email or quilt.

Try to verify the signature tags and email addresses to use the
generally
accepted "Signed-off-by: Full Name <[email protected]>" form.

Original idea by Anish Kumar <[email protected]>

regards
Antti

Signature · 1 line
http://palosaari.fi/
#3 lore raw
Quoted 2 lines · Antti Palosaari

So what is recommended way to ensure patch is correct currently?
a) before commit

Use checkpatch.

Quoted 1 line

b) after commit

Make the output of the commit log look like a patch.

#4 lore raw
Quoted 9 lines · Joe Perches
Quoted 2 lines · Antti Palosaari

So what is recommended way to ensure patch is correct currently?
a) before commit

Use checkpatch.

Quoted 1 line

b) after commit

Make the output of the commit log look like a patch.

--format=email

But still that sounds annoying, GIT is our default tool for handling patches and all the other tools like checkpatch.pl should honour that without any tricks. Why you don't add some detection logic to checkpatch.pl or even some new switch like --git.

regards
Antti

Signature · 1 line
http://palosaari.fi/
#5 lore raw
Quoted 4 lines · Antti Palosaari
Quoted 3 lines · Joe Perches
Quoted 2 lines · Antti Palosaari

So what is recommended way to ensure patch is correct currently?
a) before commit

Quoted 8 lines
Quoted 3 lines

Use checkpatch.

Quoted 1 line

b) after commit

Make the output of the commit log look like a patch.

--format=email
But still that sounds annoying, GIT is our default tool for handling patches and all the other tools like checkpatch.pl should honour that without any tricks. Why you don't add some detection logic to checkpatch.pl or even some new switch like --git.

checkpatch is, as the name shows, for patches.

I think using checkpatch on commit logs is not
really useful.

If you're using checkpatch on commit logs, format
the commit log output appropriately or use
--ignore=BAD_SIGN_OFF or add that --ignore=
to a .checkpatch.conf if you really must.

#6 lore raw
Quoted 14 lines · Joe Perches
Quoted 4 lines · Antti Palosaari
Quoted 3 lines · Joe Perches
Quoted 2 lines · Antti Palosaari

So what is recommended way to ensure patch is correct currently?
a) before commit

Quoted 8 lines
Quoted 3 lines

Use checkpatch.

Quoted 1 line

b) after commit

Make the output of the commit log look like a patch.

--format=email
But still that sounds annoying, GIT is our default tool for handling patches and all the other tools like checkpatch.pl should honour that without any tricks. Why you don't add some detection logic to checkpatch.pl or even some new switch like --git.

Quoted 4 lines

checkpatch is, as the name shows, for patches.

I think using checkpatch on commit logs is not
really useful.

But that's what I have done every time I have added patches coming community. And also for my own patches. And when problem is found it is easy to git commit --amend and fix it. I think I am not the only maintainer who checks incoming patches like this way - you will got surely more feedback when that version of checkpatch will get more usage.

Quoted 4 lines

If you're using checkpatch on commit logs, format
the commit log output appropriately or use
--ignore=BAD_SIGN_OFF or add that --ignore=
to a .checkpatch.conf if you really must.

hmm, lets see. Maybe I will add --format=email as keyboard shortcut button.

Antti

Signature · 1 line
http://palosaari.fi/
#7 lore raw
Quoted 1 line · Antti Palosaari

hmm, lets see. Maybe I will add --format=email as keyboard shortcut button.

or add

[format]
pretty = email

to your .gitconfig or create and use a
check_commitlog shell script or...