mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
run yamllint on srclibs when running 'fdroid lint'
This commit is contained in:
parent
270c55560b
commit
ed2c5f6f5b
1 changed files with 16 additions and 0 deletions
|
|
@ -600,13 +600,29 @@ def main():
|
||||||
if app.Disabled:
|
if app.Disabled:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# only run yamllint when linting individual apps.
|
||||||
if len(options.appid) > 0:
|
if len(options.appid) > 0:
|
||||||
|
|
||||||
|
# run yamllint on app metadata
|
||||||
ymlpath = os.path.join('metadata', appid + '.yml')
|
ymlpath = os.path.join('metadata', appid + '.yml')
|
||||||
if os.path.isfile(ymlpath):
|
if os.path.isfile(ymlpath):
|
||||||
yamllintresult = common.run_yamllint(ymlpath)
|
yamllintresult = common.run_yamllint(ymlpath)
|
||||||
if yamllintresult != '':
|
if yamllintresult != '':
|
||||||
print(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 = [
|
app_check_funcs = [
|
||||||
check_app_field_types,
|
check_app_field_types,
|
||||||
check_regexes,
|
check_regexes,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue