U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] checkpatch: Add a check for forbidden tags in the git log
Date: Mon, 20 Oct 2014 16:27:27 -0400	[thread overview]
Message-ID: <20141020202727.GT25506@bill-the-cat> (raw)
In-Reply-To: <1412675634-9122-1-git-send-email-alban.bedel@avionic-design.de>

On Tue, Oct 07, 2014 at 11:53:54AM +0200, Alban Bedel wrote:

> After doing this error too many times myself add a check for left
> over tags from gerrit and co.
> 
> Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
> ---
>  scripts/checkpatch.pl | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 74db2e2..3f1dedf 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -351,6 +351,15 @@ our $signature_tags = qr{(?xi:
>  	Cc:
>  )};
>  
> +our $forbidden_tags = qr{(?xi:
> +	Bug[=:]|
> +	Test[=:]|
> +	Issue:|
> +	Change-Id:|
> +	Review URL:|
> +	Reviewed-On:
> +)};
> +
>  our @typeList = (
>  	qr{void},
>  	qr{(?:unsigned\s+)?char},
> @@ -1894,6 +1903,12 @@ sub process {
>  			}
>  		}
>  
> +# Check for left over tags
> +		if ($line =~ /^\s*$forbidden_tags/i) {
> +			WARN("FORBIDDEN_TAGS",
> +			     "Do not leave extra tags (internal review marker, etc)\n" . $herecurr)
> +		}
> +
>  # Check for wrappage within a valid hunk of the file
>  		if ($realcnt != 0 && $line !~ m{^(?:\+|-| |\\ No newline|$)}) {
>  			ERROR("CORRUPTED_PATCH",

Since we last re-synced checkpatch.pl, there's a check for just
Change-Id now.  I would suggest bringing this up with upstream to also
ignore these other tags as it's a more generic problem.  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141020/7d6f42f3/attachment.pgp>

      reply	other threads:[~2014-10-20 20:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07  9:53 [U-Boot] [PATCH] checkpatch: Add a check for forbidden tags in the git log Alban Bedel
2014-10-20 20:27 ` Tom Rini [this message]

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=20141020202727.GT25506@bill-the-cat \
    --to=trini@ti.com \
    --cc=u-boot@lists.denx.de \
    /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