U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] checkpatch: Add a check for forbidden tags in the git log
@ 2014-10-07  9:53 Alban Bedel
  2014-10-20 20:27 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Alban Bedel @ 2014-10-07  9:53 UTC (permalink / raw)
  To: u-boot

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",
-- 
2.1.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-20 20:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox