mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
lint: fix duplicate usage of appid
This commit is contained in:
parent
102cbd20b3
commit
0da8c2c365
1 changed files with 8 additions and 7 deletions
|
|
@ -128,16 +128,16 @@ regex_pedantic = {
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
global config, options, appid, count
|
global config, options, curid, count
|
||||||
appid = None
|
curid = None
|
||||||
|
|
||||||
count = Counter()
|
count = Counter()
|
||||||
|
|
||||||
def warn(message):
|
def warn(message):
|
||||||
global appid, count
|
global curid, count
|
||||||
if appid:
|
if curid:
|
||||||
print "%s:" % appid
|
print "%s:" % curid
|
||||||
appid = None
|
curid = None
|
||||||
count['app'] += 1
|
count['app'] += 1
|
||||||
print ' %s' % message
|
print ' %s' % message
|
||||||
count['warn'] += 1
|
count['warn'] += 1
|
||||||
|
|
@ -163,6 +163,7 @@ def main():
|
||||||
apps = common.read_app_args(args, allapps, False)
|
apps = common.read_app_args(args, allapps, False)
|
||||||
|
|
||||||
for appid, app in apps.iteritems():
|
for appid, app in apps.iteritems():
|
||||||
|
curid = appid
|
||||||
lastcommit = ''
|
lastcommit = ''
|
||||||
|
|
||||||
if app['Disabled']:
|
if app['Disabled']:
|
||||||
|
|
@ -240,7 +241,7 @@ def main():
|
||||||
# TODO: This should not be pedantic!
|
# TODO: This should not be pedantic!
|
||||||
pwarn("'%s' used in %s '%s'" % (s, flag, build[flag]))
|
pwarn("'%s' used in %s '%s'" % (s, flag, build[flag]))
|
||||||
|
|
||||||
if not appid:
|
if not curid:
|
||||||
print
|
print
|
||||||
|
|
||||||
logging.info("Found a total of %i warnings in %i apps." % (count['warn'], count['app']))
|
logging.info("Found a total of %i warnings in %i apps." % (count['warn'], count['app']))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue