From 3664802f290e4450ddb480a864a451afa58f45a1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 27 Mar 2019 14:52:10 +0100 Subject: [PATCH] Show a warning if 'optional' critera for argument ain't a bool --- package_linter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package_linter.py b/package_linter.py index 0d18a04..564db6c 100755 --- a/package_linter.py +++ b/package_linter.py @@ -386,6 +386,9 @@ class App(): recognized_types = ("domain", "path", "boolean", "app", "password", "user", "string") for argument in manifest["arguments"]["install"]: + if "optional" in argument.keys(): + if not isinstance(argument["optional"], bool): + print_warning("The key 'optional' value for setting %s should be a boolean (true or false)" % argument["name"]) if "type" not in argument.keys(): print_warning( "[YEP-2.1] You should specify the type of the argument '%s'. "