1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00

catalog linter

This commit is contained in:
Félix Piédallu 2024-08-13 11:48:06 +02:00 committed by Félix Piédallu
parent b75ea0b1b4
commit d1a6b6b25b

View file

@ -1,5 +1,6 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
import argparse
import json import json
import sys import sys
from pathlib import Path from pathlib import Path
@ -7,6 +8,7 @@ from difflib import SequenceMatcher
from typing import Any, Dict, Generator, List, Tuple from typing import Any, Dict, Generator, List, Tuple
import jsonschema import jsonschema
import appslib.get_apps_repo as get_apps_repo
from appslib.utils import ( from appslib.utils import (
REPO_APPS_ROOT, # pylint: disable=import-error REPO_APPS_ROOT, # pylint: disable=import-error
get_antifeatures, get_antifeatures,
@ -98,6 +100,10 @@ def check_all_apps() -> Generator[Tuple[str, List[Tuple[str, bool]]], None, None
def main() -> None: def main() -> None:
parser = argparse.ArgumentParser()
get_apps_repo.add_args(parser)
args = parser.parse_args()
has_errors = False has_errors = False
has_errors |= validate_schema_pretty(get_antifeatures(), "antifeatures.toml") has_errors |= validate_schema_pretty(get_antifeatures(), "antifeatures.toml")