Yaml validation schemas have been created for controls, features, metadata and threats files, to ensure that contributions follow the approved structure and contain required values.
By default, the contents of .vscode/settings.json
should automatically be considered by Visual Studio Code. In-line suggestions should appear in the event that your file is not compatible with the corresponding schema.
If this does not satisfy your use case for some reason, you can update your global VSCode settings to highlight issues using the schema files with the following steps:
-
Install VSCode Red Hat YAML extension
-
Under VSCode
settings.json
add the following (or your local equivalent):"yaml.schemas": { "file:///<PATH_TO_CCC_REPO>/common-cloud-controls/schemas/controls-schema.json": "controls.yaml", "file:///<PATH_TO_CCC_REPO>/common-cloud-controls/schemas/features-schema.json": "features.yaml", "file:///<PATH_TO_CCC_REPO>/common-cloud-controls/schemas/metadata-schema.json": "metadata.yaml", "file:///<PATH_TO_CCC_REPO>/common-cloud-controls/schemas/threats-schema.json": "threats.yaml" }
-
Save these settings and reload VSCode.