Lines Matching +full:json +full:- +full:schema
2 # SPDX-License-Identifier: Apache-2.0
8 import json
19 DEFAULT_SCHEMA_FILENAME = "global.json"
22 def get_default_thread_count() -> int:
36 # second group captures comments (//single-line or /* multi-line */)
54 "-s",
55 "--schema",
57 "Use the specified schema file instead of the default "
58 "(__file__/../../schemas/global.json)"
62 "-c",
63 "--config",
68 "(__file__/../../configurations/**.json)"
72 "-e",
73 "--expected-fails",
80 "-k",
81 "--continue",
86 "-v", "--verbose", action="store_true", help="be noisy"
89 "-t",
90 "--threads",
97 schema_file = args.schema
100 source_dir = os.path.realpath(__file__).split(os.sep)[:-2]
114 source_dir = os.path.realpath(__file__).split(os.sep)[:-2]
119 if f.endswith(".json"):
131 configs.append(json.loads(remove_c_comments(fd.read())))
184 # Stop validation if validation failed unexpectedly and --continue is not set
210 # Get root directory of schema file, so we can walk all the directories
217 # Pre-load all .json files from the schemas directory and its subdirectories
218 # into the registry. This allows $refs to resolve to any schema.
221 if filename.endswith(".json"):
228 schema_contents = json.loads(remove_c_comments(fd.read()))
242 # as the root schema.
246 # Create the validator instance with the schema content and the configured registry.