mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Olof Johansson <olof@lixom.net>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	apw@canonical.com
Subject: Re: [PATCH] checkpatch: warn on found Change-Id lines
Date: Mon, 10 Oct 2011 10:09:59 -0700	[thread overview]
Message-ID: <1318266599.27825.12.camel@Joe-Laptop> (raw)
In-Reply-To: <1318226216-5317-1-git-send-email-olof@lixom.net>

On Sun, 2011-10-09 at 22:56 -0700, Olof Johansson wrote:
> Some external projects use repo, which uses a special-format Change-Id
> field in the commit message for some internal bookkeeping (to re-associate
> patches back to review entries, etc).

I believe Andrew has a patch from me in his queue
somewhere that tries to isolate the commit message
and does a couple of checks just on that content.

> Sometimes they sneak into patches
> going upstream, which is embarrassing for the developer, and annoying
> for the maintainer.
> 
> Add checking for these to checkpatch, to catch them before
> posting. Provide a way to disable the check to keep checkpatch useful
> for intra-project use.
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> +my $chk_changeid = 1;

> +  --no-change-id             don't complain about 'Change-Id' lines

Adding piecemeal option overrides could eventually
make these sorts of things quite long.

Perhaps it's better to use:
--ignore=CHANGE_ID

or add a .checkpatch.conf file somewhere with this.

> +	'change-id!'	=> \$chk_changeid,

> +$chk_changeid = 0 if ($file);

> +# Check for Change-Id lines:
> +		if ($line =~ /^\s*change-id:/i && $chk_changeid) {
> +			ERROR("CHANGE_ID", "Found Change-Id line\n", $herecurr);
> +		}

I believe this will also match lines in any
patch context, so maybe this is not good.

I think this should be placed adjacent to the
RCS/CVS check.

Maybe it's better to add some "VCS_CRUFT"
option and track/emit all the RCS/SCCS/PVS/CVS
crud in one bundle.



  reply	other threads:[~2011-10-10 17:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10  5:56 Olof Johansson
2011-10-10 17:09 ` Joe Perches [this message]
2011-10-10 22:10   ` Andrew Morton
2011-10-10 22:32     ` [PATCH] checkpatch: Add a --strict check for utf-8 in commit logs Joe Perches
2011-10-10 22:42       ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1318266599.27825.12.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®