rokucommunity / brighterscript

A superset of Roku's BrightScript language
MIT License
151 stars 47 forks source link

[bsconfig] validate jsonschema when loading the bsconfig.json files #1142

Open bartvandenende-wm opened 2 months ago

bartvandenende-wm commented 2 months ago

Summary

[bsconfig] validate bsconfig.json against the jsonschema when the json data is loaded.

Details

It would be great if the loadConfigFile utility in https://github.com/rokucommunity/brighterscript/blob/483a15454f1c8751619421ee4c99dbf4fdd073d7/src/util.ts#L168

would be able to validate the data payload in the bsconfig.json file against the json-schema defined in https://github.com/rokucommunity/brighterscript/blob/483a15454f1c8751619421ee4c99dbf4fdd073d7/bsconfig.schema.json#L4

TwitchBronBron commented 1 month ago

Yeah this would be nice. Find some way to add diagnostics about bad syntax/unknown options.