[Linux-kernel-mentees] [PATCH v2] checkpatch: extend author Signed-off-by check for split From: header

Lukas Bulwahn lukas.bulwahn at gmail.com
Sun Sep 20 08:01:50 UTC 2020



On Sun, 20 Sep 2020, Dwaipayan Ray wrote:

> Checkpatch did not handle cases where the author From: header
> was split into multiple lines. The author identity could not
> be resolved and checkpatch generated a false NO_AUTHOR_SIGN_OFF
> warning.
> 
> Support split From: headers in AUTHOR_SIGN_OFF check by correctly
> parsing the entire From: header in such cases.
>

Looks good to me.

Maybe you can some examples that are now handled better, typical cases of 
the different classes and a summary on your evaluation in the commit 
message.

Do that and send out the PATCH v2 to the linux-kernel mailing list with 
the typical recipients.

Lukas
 
> Signed-off-by: Dwaipayan Ray <dwaipayanray1 at gmail.com>
> ---
>  scripts/checkpatch.pl | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 504d2e431c60..8ee61ec346b3 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -2661,6 +2661,10 @@ sub process {
>  # Check the patch for a From:
>  		if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
>  			$author = $1;
> +			my $curline = $linenr-1;
> +			while(defined($rawlines[++$curline]) && ($rawlines[$curline] =~ /^\s+(.*)/)) {
> +				$author.= $1;
> +			}
>  			$author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);
>  			$author =~ s/"//g;
>  			$author = reformat_email($author);
> -- 
> 2.27.0
> 
> 


More information about the Linux-kernel-mentees mailing list