[Linux-kernel-mentees] Regarding "Linux Kernel: Evaluate and Improve checkpatch.pl"

Lukas Bulwahn lukas.bulwahn at gmail.com
Wed Sep 9 09:52:08 UTC 2020



On Wed, 9 Sep 2020, Ayush wrote:

> > No, that is allowed. There can be of course a line break after commit
> > and before the hash, it is just that the current checkpatch.pl script
> > does not handle this case yet.
> > 
> > That would need improvement.
> 
> I have already sent a patch for handling quotes in commit messages.
> (https://lists.linuxfoundation.org/pipermail/linux-kernel-mentees/2020-September/004026.html)
>

Yes, I have seen that. I do not think it will be accepted (it is just too 
unclear), but you will see.

> I have created another patch which fixes line breaks after commit and
> before hash.
> 
> It can handles cases like:
> 
> - commit
> 1234567890ab ("foo bar")
> 
> - commit
> 1234567890ab ("Revert "foo bar"")
> 
> But, my question is, should I send this as a new patch or append it with
> my last patch and make a patch v2?

Create a separate patch that can be applied independently. As a mentor, I 
suggest to first send the patch only to me and the linux-kernel-mentees 
list, so that you get some first feedback without bothering the 
maintainers and them losing patience to work with you.

I suggest to work on this patch here first and then revisit the other 
patch for revert commits you created.

> My last patch is still under review.
> 
> > I do not think that it is disallowed, but maybe a new check in
> > checkpatch.pl is recommended to make aware that quotes in commit
> > message subject lines cannot be properly handled and are discouraged.
> 
> So, should we give a warning if (no. of quotes > 4)?
> 

I suggest to implement a check if a commit message contains quotes. Then, 
we can check on previous commits how often that would trigger and see if 
we find legitimate cases where quotes really make sense; then we can 
improve checkpatch.pl to handle those well when refering to such commits.


Lukas


More information about the Linux-kernel-mentees mailing list