lkml.org 
[lkml]   [2020]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] checkpatch: add fix option for MISSING_SIGN_OFF
From
Date
On Wed, 2020-11-11 at 00:36 +0530, Aditya Srivastava wrote:
> Currently checkpatch warns us if there is no 'Signed-off-by' line
> for the patch.

trivial style and a comment:

> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -2755,6 +2757,10 @@ sub process {
>   if ($line =~ /^---$/) {
>   $has_patch_separator = 1;
>   $in_commit_log = 0;
> + # to add missing sign off line before diff(s)
> + if($patch_separator_linenr == 0) {

space after if

> + $patch_separator_linenr = $linenr;
> + }
[]
> @@ -7118,9 +7127,12 @@ sub process {
>   "Does not appear to be a unified-diff format patch\n");
>   }
>   if ($is_patch && $has_commit_log && $chk_signoff) {
> - if ($signoff == 0) {
> - ERROR("MISSING_SIGN_OFF",
> - "Missing Signed-off-by: line(s)\n");
> + if ($signoff == 0 && !$non_standard_signature) {
> + if (ERROR("MISSING_SIGN_OFF",
> + "Missing Signed-off-by: line(s)\n") &&
> + $fix) {
> + fix_insert_line($patch_separator_linenr - 1, "Signed-off-by: $author");

Perhaps this needs to test $patch_separator_linenr to
make sure it's not 0.


\
 
 \ /
  Last update: 2020-11-10 21:21    [W:0.038 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site