diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index 1a645a8c425..f0f937f0741 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -168,7 +168,6 @@ "label-commenter-config.json", "launchsettings.json", "lerna.json", - "lgtm.json", "libman.json", "lintstagedrc.schema.json", "mdxlintrc.json", diff --git a/src/schemas/json/lgtm.json b/src/schemas/json/lgtm.json index 46ba795faf9..8634fff883f 100644 --- a/src/schemas/json/lgtm.json +++ b/src/schemas/json/lgtm.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/lgtm.json", "$comment": "https://lgtm.com/help/lgtm/lgtm.yml-configuration-file", "definitions": { "queryItem": { @@ -29,7 +30,6 @@ } }, "description": "Configuration file for lgtm, for continuous security analysis.", - "id": "https://json.schemastore.org/lgtm.json", "properties": { "path_classifiers": { "title": "Path Classifiers", @@ -39,35 +39,50 @@ "description": "Classify files on this path with the parent tag.", "type": "array", "items": { - "type": ["string", "object"], - "properties": { - "exclude": { - "title": "Exclude", - "description": "Do not classify files on this path with the parent tag.", + "anyOf": [ + { "type": "string" + }, + { + "type": "object", + "properties": { + "exclude": { + "title": "Exclude", + "description": "Do not classify files on this path with the parent tag.", + "type": "string" + } + } } - } + ] } } }, "queries": { - "title": "Queries", - "type": ["array", "null"], - "items": { - "title": "Query", - "properties": { - "exclude": { - "$ref": "#/definitions/queryItem", - "title": "Exclude", - "description": "Hide the results for queries with the specified properties." - }, - "include": { - "$ref": "#/definitions/queryItem", - "title": "Include", - "description": "Show the results for queries with the specified properties." + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "title": "Query", + "properties": { + "exclude": { + "$ref": "#/definitions/queryItem", + "title": "Exclude", + "description": "Hide the results for queries with the specified properties." + }, + "include": { + "$ref": "#/definitions/queryItem", + "title": "Include", + "description": "Show the results for queries with the specified properties." + } + } } + }, + { + "type": "null" } - } + ], + "title": "Queries" }, "extraction": { "title": "Extraction", @@ -120,10 +135,17 @@ }, "build_command": { "title": "Build Command", - "type": ["array", "string"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "string" + } + ] }, "buildless": { "title": "Buildless", @@ -161,6 +183,7 @@ } }, "filetypes": { + "type": "object", "title": "Filetypes", "description": "Specify additional file types to extract.", "additionalProperties": { @@ -173,7 +196,14 @@ "properties": { "version": { "title": "Version", - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, @@ -188,7 +218,14 @@ "java_version": { "title": "Java Version", "description": "Specify the Java version required to build the project.", - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] }, "maven": { "title": "Maven", @@ -208,7 +245,14 @@ "version": { "title": "Version", "description": "Specify the required Maven version.", - "type": ["string", "number"] + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } } }, @@ -284,10 +328,17 @@ "command": { "title": "Command", "description": "Override the default process by specifying a list of commands to run to generate the build configuration.", - "type": ["array", "null"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ] } } }, @@ -317,10 +368,17 @@ "requirements_files": { "title": "Requirement Files", "description": "Specify a list of requirements text files to use to set up the environment, or false for none.", - "type": ["array", "boolean"], - "items": { - "type": "string" - } + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "boolean" + } + ] }, "setup_py": { "title": "Setup Python", @@ -330,7 +388,14 @@ "version": { "title": "Version", "description": "Override the version of the Python interpreter used for setup and extraction.", - "type": ["string", "number"], + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ], "default": 3 } }