Commit cfd45066 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen
Browse files

make bad-URL-regexp configurable


this is needed for the digia-internal sanity bot.

on the downside, local sanity checking won't complain about url abuse
anymore (unless the user configures it), but that seems somewhat minor
to me.

Change-Id: Ibbcd2b8ef79668d7f7c7c3a9aa6702c7599c4db1
Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
parent 99c17051
No related merge requests found
Showing with 3 additions and 2 deletions
...@@ -102,7 +102,8 @@ my $iswip = defined($cfg{wip}); ...@@ -102,7 +102,8 @@ my $iswip = defined($cfg{wip});
my $badrev = 0; my $badrev = 0;
my $badsign = 0; my $badsign = 0;
my $badid = defined($cfg{changeid}); my $badid = defined($cfg{changeid});
my $badurl = defined($cfg{url}); my $badurl_rx = $config{badurl};
my $badurl = !defined($badurl_rx) || defined($cfg{url});
my $badlog = defined($cfg{log}); my $badlog = defined($cfg{log});
my $spell_check = !defined($cfg{spell}); my $spell_check = !defined($cfg{spell});
my $parents = 0; my $parents = 0;
...@@ -286,7 +287,7 @@ while (<MSG>) { ...@@ -286,7 +287,7 @@ while (<MSG>) {
if (!$badid && /\bI[0-9a-f]{40}\b/ && !/^Change-Id: /) { if (!$badid && /\bI[0-9a-f]{40}\b/ && !/^Change-Id: /) {
complain_ln("Gerrit change id outside Change-Id footer", "changeid"); complain_ln("Gerrit change id outside Change-Id footer", "changeid");
} }
if (!$badurl && /\bhttps?:\/\/(bugreports\.qt-project\.org\/browse\/|codereview\.qt-project\.org\/(\#change,|\#\/c\/)?\d+)/) { if (!$badurl && /$badurl_rx/o) {
complain_ln("URL pointing to Gerrit or JIRA", "url"); complain_ln("URL pointing to Gerrit or JIRA", "url");
} }
my $ftr = 0; my $ftr = 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment