'Donate': http_checks + [
(re.compile(r'.*flattr\.com'),
_("Flattr donation methods belong in the FlattrID flag")),
+ (re.compile(r'.*liberapay\.com'),
+ _("Liberapay donation methods belong in the LiberapayID flag")),
],
'Changelog': http_checks,
'Author Name': [
_("Unnecessary leading space")),
(re.compile(r'.*\s$'),
_("Unnecessary trailing space")),
+ (re.compile(r'.*<(applet|base|body|button|embed|form|head|html|iframe|img|input|link|object|picture|script|source|style|svg|video).*', re.IGNORECASE),
+ _("Forbidden HTML tags")),
+ (re.compile(r'''.*\s+src=["']javascript:.*'''),
+ _("Javascript in HTML src attributes")),
],
}
yield _("Branch '{branch}' used as commit in build '{versionName}'")\
.format(branch=s, versionName=build.versionName)
for srclib in build.srclibs:
- ref = srclib.split('@')[1].split('/')[0]
- if ref.startswith(s):
- yield _("Branch '{branch}' used as commit in srclib '{srclib}'")\
- .format(branch=s, srclib=srclib)
+ if '@' in srclib:
+ ref = srclib.split('@')[1].split('/')[0]
+ if ref.startswith(s):
+ yield _("Branch '{branch}' used as commit in srclib '{srclib}'")\
+ .format(branch=s, srclib=srclib)
+ else:
+ yield _('srclibs missing name and/or @') + ' (srclibs: ' + srclib + ')'
for key in build.keys():
if key not in supported_flags:
yield _('%s is not an accepted build field') % key