lint: enforce HTTPS on GitHub and GitLab pages

The always provide HTTPS, so let's enforce it.
This commit is contained in:
Hans-Christoph Steiner 2019-09-30 13:08:58 +02:00
parent 17320c23f4
commit af4e231f7d
2 changed files with 9 additions and 1 deletions

View file

@ -120,7 +120,11 @@ http_url_shorteners = [
]
http_checks = https_enforcings + http_url_shorteners + [
(re.compile(r'.*github\.com/[^/]+/[^/]+\.git'),
(re.compile(r'^(?!https?://)[^/]+'),
_("URL must start with https:// or http://")),
(re.compile(r'^http://[^.]+\.(github|gitlab)\.io/'),
_("URL must start with https://")),
(re.compile(r'^https://(github|gitlab)\.com(/[^/]+){2,3}\.git'),
_("Appending .git is not necessary")),
(re.compile(r'^https://[^/]*(github|gitlab|bitbucket|rawgit)\.[a-zA-Z]+/([^/]+/){2,3}master/'),
_("Use /HEAD instead of /master to point at a file in the default branch")),