lkml.org 
[lkml]   [2014]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] checkpatch.pl: Add check for Change-Id
From
Date
On Wed, 2014-03-19 at 14:54 -0400, Christopher Covington wrote:
> A commit hook for the Gerrit code review server inserts change
> identifiers so Gerrit can track patches through multiple revisions.
> These identifiers are noise in the context of the upstream kernel.
> (Many Gerrit servers are private. Even given a public instance,
> given only a Change-Id, one must guess which server a change was
> tracked on. Patches submitted to the Linux kernel mailing lists
> should be able to stand on their own. If it's truly useful to
> reference code review on a Gerrit server, a URL is a much clearer
> way to do so.) Thus, issue an error when a Change-Id: line is
> encountered.
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -1891,6 +1891,12 @@ sub process {
> }
> }
>
> +# Check for unwanted Gerrit info
> + if ($line =~ /^\s*change-id:/i) {
> + ERROR("BAD_SIGN_OFF",
> + "Remove Gerrit Change-Id's before submitting upstream.\n" . $herecurr);
> + }
> +

I think this needs an "$in_commit_log" test added

if ($in_commit_log &&
$line =~ /^\s*change-id:/i) {

And maybe use a separate "TYPE", not "BAD_SIGN_OFF".
Maybe "GERRIT_CHANGE_ID"



\
 
 \ /
  Last update: 2014-03-20 11:41    [W:0.076 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site