checkpatch: Update signature "might be better as" warning
A message that is not in the archive (sent off-list or not yet received): alpine.DEB.2.02.1111052254540.1963@hadrien
Joe Perches
maintainerPATCH 1/1 checkpatch: Update signature "might be better as" warning
email header lines can look like signatures tags. It's valid to have multiple email recipients on a single line but not valid to have multiple signatures on a single line.
Validate signatures only when not in the email headers.
Clear the $in_commit_log flag when the patch filename appears.
Add '-' to the valid chars in a message header for headers like "Message-Id:" and "In-Reply-To:".
---
Quoted 7 lines · Julia Lawall
Checkpatch is giving me, eg:
'Simon Wunderlich <[email protected]>,"David S. Miller" <[email protected]>,[email protected],[email protected],[email protected]' might be better as '"Simon Wunderlich <[email protected]>,\"David S.
Miller" <[email protected]>,[email protected],[email protected],[email protected]' The problem seems to go away if I get rid of the quotes around "David S.
Miller". Is it intentional to give a warning in this case?
scripts/checkpatch.pl | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
scripts/checkpatch.pl +5 -2
@@ -1504,9 +1504,11 @@ sub process { if ($line =~ /^diff --git.*?(\S+)$/) { $realfile = $1; $realfile =~ s@^([^/]*)/@@; + $in_commit_log = 0; } elsif ($line =~ /^\+\+\+\s+(\S+)/) { $realfile = $1; $realfile =~ s@^([^/]*)/@@; + $in_commit_log = 0; $p1_prefix = $1; if (!$file && $tree && $p1_prefix ne '' &&
@@ -1546,7 +1548,8 @@ sub process { } # Check signature styles - if ($line =~ /^(\s*)($signature_tags)(\s*)(.*)/) { + if (!$in_header_lines && + $line =~ /^(\s*)($signature_tags)(\s*)(.*)/) { my $space_before = $1; my $sign_off = $2; my $space_after = $3;
@@ -1623,7 +1626,7 @@ sub process { # Check if it's the start of a commit log # (not a header line and we haven't seen the patch filename) if ($in_header_lines && $realfile =~ /^$/ && - $rawline !~ /^(commit\b|from\b|\w+:).+$/i) { + $rawline !~ /^(commit\b|from\b|[\w-]+:).+$/i) { $in_header_lines = 0; $in_commit_log = 1; }
Signature · 1 line
1.7.6.405.gc1be0