From: Daniel Martí Date: Sat, 28 Nov 2015 10:32:46 +0000 (+0100) Subject: lint: more versatile /HEAD warning X-Git-Tag: 0.6.0~90 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=ce2f4a115c96f761047e287c7e16132c270149fc;p=fdroidserver.git lint: more versatile /HEAD warning Now catches many more github/gitlab/bitbucket links --- 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 = {