mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Show a warning if 'optional' critera for argument ain't a bool
This commit is contained in:
parent
9181e08814
commit
3664802f29
1 changed files with 3 additions and 0 deletions
|
@ -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'. "
|
||||
|
|
Loading…
Reference in a new issue