# Parse command line...
parser = OptionParser(usage="Usage: %prog [options] [APPID [APPID ...]]")
- parser.add_option("-p", "--pedantic", action="store_true", default=False,
- help="Show pedantic warnings that might give false positives")
parser.add_option("-v", "--verbose", action="store_true", default=False,
help="Spew out even more information than normal")
+ parser.add_option("-q", "--quiet", action="store_true", default=False,
+ help="Restrict output to warnings and errors")
+ parser.add_option("-p", "--pedantic", action="store_true", default=False,
+ help="Show pedantic warnings that might give false positives")
(options, args) = parser.parse_args()
config = common.read_config(options)
continue
for build in app['builds']:
- if 'commit' in build and 'disable' not in build:
+ if build['commit'] and not build['disable']:
lastcommit = build['commit']
# Potentially incorrect UCM
# Redundant summaries
summary = app['Summary']
- name = str(app['Name'] if app['Name'] else app['Auto Name'])
+ name = app['Name'] or app['Auto Name']
if summary and name:
summary_l = summary.lower()
name_l = name.lower()
# Build warnings
for build in app['builds']:
- for n in ['master', 'origin/', 'default', 'trunk']:
- if 'commit' in build:
- if build['commit'].startswith(n):
- warn("Branch '%s' used as commit in build '%s'" % (
- n, build['version']))
- if 'srclibs' in build:
- for srclib in build['srclibs']:
- ref = srclib.split('@')[1].split('/')[0]
- if ref.startswith(n):
- warn("Branch '%s' used as commit in srclib '%s'" % (
- n, srclib))
+ for s in ['master', 'origin/', 'default', 'trunk']:
+ if build['commit'] and build['commit'].startswith(s):
+ warn("Branch '%s' used as commit in build '%s'" % (
+ s, build['version']))
+ for srclib in build['srclibs']:
+ ref = srclib.split('@')[1].split('/')[0]
+ if ref.startswith(s):
+ warn("Branch '%s' used as commit in srclib '%s'" % (
+ s, srclib))
+ for s in ['git clone', 'svn checkout', 'svn co', 'hg clone']:
+ for flag in ['init', 'prebuild', 'build']:
+ if not build[flag]:
+ continue
+ if s in build[flag]:
+ # TODO: This should not be pedantic!
+ pwarn("'%s' used in %s '%s'" % (s, flag, build[flag]))
if not appid:
print