1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-17 10:40:12 +02:00

lint: check all build fields against accepted list

This makes sure there are no typoed or wrong build fields in all metadata
files.
This commit is contained in:
Michael Pöhn 2017-06-27 22:46:19 +02:00 committed by Hans-Christoph Steiner
parent b34d5c83b9
commit 20afa0e861

View File

@ -299,6 +299,8 @@ def check_bulleted_lists(app):
def check_builds(app):
supported_flags = set(metadata.build_flags)
# needed for YAML and JSON
for build in app.builds:
if build.disable:
if build.disable.startswith('Generated by import.py'):
@ -311,6 +313,9 @@ def check_builds(app):
ref = srclib.split('@')[1].split('/')[0]
if ref.startswith(s):
yield "Branch '%s' used as commit in srclib '%s'" % (s, srclib)
for key in build.keys():
if key not in supported_flags:
yield key + ' is not an accepted build field'
def check_files_dir(app):