From 20afa0e8613c6e6914fd877571dbb08141b2678e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michael=20P=C3=B6hn?= Date: Tue, 27 Jun 2017 22:46:19 +0200 Subject: [PATCH] lint: check all build fields against accepted list This makes sure there are no typoed or wrong build fields in all metadata files. --- fdroidserver/lint.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index 200bddf6..04ef0f9c 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -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): -- 2.30.2