Currently, each check is supposed to provide a JSON schema for the diagnostic files it uses. While this approach is extremely flexible and allows different checks to use different schemas for the same file, it requires writing extra code.
To reduce the amount of code required to write a check and hence facilitate adoption, I suggest to maintain one schema for each diagnostic file. This way, written once for a check, the schema can be used by all future checks using the same diagnostic file.
Since for some files crafting a schema is infeasible (think state.json), additionally provide a mechanism—simply expose standard golang json reader?—to dynamically build a JSON representation without a schema and allow to walk it in a check.
Currently, each check is supposed to provide a JSON schema for the diagnostic files it uses. While this approach is extremely flexible and allows different checks to use different schemas for the same file, it requires writing extra code.
To reduce the amount of code required to write a check and hence facilitate adoption, I suggest to maintain one schema for each diagnostic file. This way, written once for a check, the schema can be used by all future checks using the same diagnostic file.
Since for some files crafting a schema is infeasible (think
state.json
), additionally provide a mechanism—simply expose standard golang json reader?—to dynamically build a JSON representation without a schema and allow to walk it in a check.