1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-05 18:50:09 +02:00

run yamllint on srclibs when running 'fdroid lint'

This commit is contained in:
Michael Pöhn 2020-04-25 15:57:21 +02:00
parent 270c55560b
commit ed2c5f6f5b

View File

@ -600,13 +600,29 @@ def main():
if app.Disabled:
continue
# only run yamllint when linting individual apps.
if len(options.appid) > 0:
# run yamllint on app metadata
ymlpath = os.path.join('metadata', appid + '.yml')
if os.path.isfile(ymlpath):
yamllintresult = common.run_yamllint(ymlpath)
if yamllintresult != '':
print(yamllintresult)
# run yamllint on srclib metadata
srclibs = set()
for build in app.builds:
for srclib in build.srclibs:
srclibs.add(srclib)
for srclib in srclibs:
name, numer, libdir = common.getsrclib(srclib, 'srclibs', prepare=False, refresh=False)
srclibpath = os.path.join('srclibs', name + '.yml')
if os.path.isfile(srclibpath):
yamllintresult = common.run_yamllint(srclibpath)
if yamllintresult != '':
print(yamllintresult)
app_check_funcs = [
check_app_field_types,
check_regexes,