From ce2f4a115c96f761047e287c7e16132c270149fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=AD?= Date: Sat, 28 Nov 2015 11:32:46 +0100 Subject: [PATCH] lint: more versatile /HEAD warning Now catches many more github/gitlab/bitbucket links --- fdroidserver/lint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index 7821b581..f7d79255 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -55,8 +55,8 @@ http_url_shorteners = [ http_checks = https_enforcings + http_url_shorteners + [ (re.compile(r'.*github\.com/[^/]+/[^/]+\.git'), "Appending .git is not necessary"), - (re.compile(r'(.*/blob/master/|.*raw\.github.com/[^/]*/[^/]*/master/|.*/raw/master/)'), - "Use /HEAD/ instead of /master/ to point at a file in the default branch"), + (re.compile(r'.*://[^/]*(github|gitlab|bitbucket|rawgit)[^/]*/([^/]+/){1,3}master'), + "Use /HEAD instead of /master to point at a file in the default branch"), ] regex_checks = { -- 2.30.2