Skip to content

Add CI job for linting json files

The schema is based on the KPluginMetaData definition. In case another JSON file is validated which does not have the KPlugin object, no validation is done.

I tried to only validate the changed files, but due to missing ENV variables and the bare clone this does not seem possible. Considering that validating all JSON files in KWin takes ~1 second, it is probably not worth it.

Test Plan:

Put the following files in a directory: missingcomma.json metadata.valid.json metadata.json object.json array.json

The last two files represent cases where a JSON file has nothing to do with KPluginMetaData.

Validating ./metadata.json
./missingcomma.json
./metadata.valid.json
./object.json
./array.json
Several files failed to parse.
  Failed to parse missingcomma.json
Schema validation errors were encountered.
  metadata.json::$.KPlugin.Authors[0]: 'Name' is a required property
Edited by Alexander Lohnau

Merge request reports