"github URLs should always use https:// not http://"),
(re.compile(r'.*[^sS]://code\.google\.com/.*'),
"code.google.com URLs should always use https:// not http://"),
- ],
+ ],
'Source Code': [
(re.compile(r'.*[^sS]://github\.com/.*'),
"github URLs should always use https:// (not http://, git://, or git@)"),
"dl.google.com URLs should always use https:// not http://"),
(re.compile(r'.*[^sS]://gitorious\.org/.*'),
"gitorious URLs should always use https:// (not http://, git://, or git@)"),
- ],
+ ],
'Repo': [
(re.compile(r'.*[^sS]://code\.google\.com/.*'),
"code.google.com URLs should always use https:// not http://"),
"Apache SVN URLs should always use https:// (not http:// or svn://)"),
(re.compile(r'.*[^sS]://svn\.code\.sf\.net/.*'),
"Sourceforge SVN URLs should always use https:// (not http:// or svn://)"),
- ],
+ ],
'Issue Tracker': [
(re.compile(r'.*code\.google\.com/p/[^/]+[/]*$'),
"/issues is missing"),
"github URLs should always use https:// not http://"),
(re.compile(r'.*[^sS]://gitorious\.org/.*'),
"gitorious URLs should always use https:// not http://"),
- ],
+ ],
'License': [
(re.compile(r'^(|None|Unknown)$'),
"No license specified"),
- ],
+ ],
'Summary': [
(re.compile(r'^$'),
"Summary yet to be filled"),
- ],
+ ],
'Description': [
(re.compile(r'^No description available$'),
"Description yet to be filled"),
"Unnecessary leading space"),
(re.compile(r'.*\s$'),
"Unnecessary trailing space"),
- ],
+ ],
}
regex_pedantic = {
"Appending .git is not necessary"),
(re.compile(r'.*code\.google\.com/p/[^/]+/[^w]'),
"Possible incorrect path appended to google code project site"),
- ],
+ ],
'Source Code': [
(re.compile(r'.*github\.com/[^/]+/[^/]+\.git'),
"Appending .git is not necessary"),
(re.compile(r'.*code\.google\.com/p/[^/]+/source/.*'),
"/source is often enough on its own"),
- ],
+ ],
'Repo': [
(re.compile(r'^http://.*'),
"use https:// if available"),
(re.compile(r'^svn://.*'),
"use https:// if available"),
- ],
+ ],
'Issue Tracker': [
(re.compile(r'.*code\.google\.com/p/[^/]+/issues/.*'),
"/issues is often enough on its own"),
(re.compile(r'.*github\.com/[^/]+/[^/]+/issues/.*'),
"/issues is often enough on its own"),
- ],
+ ],
'Summary': [
(re.compile(r'.*\b(free software|open source)\b.*', re.IGNORECASE),
"No need to specify that the app is Free Software"),
(re.compile(r'.*[a-z0-9][.,!?][ $]'),
"Punctuation should be avoided"),
- ],
- }
+ ],
+}
def main():
apps = common.read_app_args(args, allapps, False)
for appid, app in apps.iteritems():
- curid = appid
- lastcommit = ''
-
if app['Disabled']:
continue
+ curid = appid
count['app_total'] += 1
+ curbuild = None
for build in app['builds']:
- if build['commit'] and not build['disable']:
- lastcommit = build['commit']
+ if not curbuild or int(build['vercode']) > int(curbuild['vercode']):
+ curbuild = build
# Potentially incorrect UCM
- if (app['Update Check Mode'] == 'RepoManifest' and
- any(s in lastcommit for s in '.,_-/')):
+ if (curbuild and curbuild['commit']
+ and app['Update Check Mode'] == 'RepoManifest' and
+ any(s in curbuild['commit'] for s in '.,_-/')):
pwarn("Last used commit '%s' looks like a tag, but Update Check Mode is '%s'" % (
- lastcommit, app['Update Check Mode']))
+ curbuild['commit'], app['Update Check Mode']))
+
+ # Dangerous auto updates
+ if curbuild and app['Auto Update Mode'] != 'None':
+ for flag in ['target', 'srclibs', 'scanignore']:
+ if curbuild[flag]:
+ pwarn("Auto Update Mode is enabled but '%s' is manually set at '%s'" % (flag, curbuild[flag]))
# Summary size limit
summ_chars = len(app['Summary'])