From fce2daf516031751646f9f70cef67672f0344f3e Mon Sep 17 00:00:00 2001
From: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Date: Fri, 4 Apr 2014 19:56:15 +0200
Subject: [PATCH] add link to the wiki at the bottom of every unclean verdict

it would be conceivable to integrate this with the bot driving this
script, so the message would be appended only to the first patchset in a
change, or even only to the first complaint (within a while) for any
particular contributor.

Change-Id: I5a7e3265dea8a3e24649d223fdd6e96c886eebc1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
---
 git-hooks/sanitize-commit | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/git-hooks/sanitize-commit b/git-hooks/sanitize-commit
index 0b949b4..a390be2 100755
--- a/git-hooks/sanitize-commit
+++ b/git-hooks/sanitize-commit
@@ -40,6 +40,7 @@ if (defined $config{flags}) {
 }
 my $fail = 0;
 my $printed = $gerrit;
+my $complained = 0;
 our $file = "";  # 'our' for usage of 'local'
 my $fail_file = "-";
 my $summary;
@@ -63,6 +64,7 @@ sub complain()
         print "***\n*** Suspicious changes in commit ".$sha1." (".$summary."):\n";
         $printed = 1;
     }
+    $complained = 1;
     if (length($file)) {
         if ($file ne $fail_file) {
             print $elpfx.$lpfx.$file.":\n";
@@ -574,4 +576,8 @@ if (%footnotes) {
     }
 }
 
+if ($complained) {
+    print $elpfx.$lpfx."See http://qt-project.org/wiki/Early-Warning-System for explanations.\n";
+}
+
 exit ($gerrit ? (!$fail ? 11 : (10 - $fail)) : $fail)
-- 
GitLab