{ "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "diagnostics": { "items": { "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "message": { "type": "string", "description": "The diagnostic's message." }, "location": { "properties": { "path": { "type": "string", "description": "File path. It could be either absolute path or relative path." }, "range": { "$ref": "reviewdog.rdf.Range", "additionalProperties": true, "type": "object", "description": "Range in the file path.\n Optional." } }, "additionalProperties": true, "type": "object", "description": "Location at which this diagnostic message applies." }, "severity": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "description": "This diagnostic's severity.\n Optional." }, "source": { "$ref": "reviewdog.rdf.Source", "additionalProperties": true, "type": "object", "description": "The source of this diagnostic, e.g. 'typescript' or 'super lint'.\n Optional." }, "code": { "properties": { "value": { "type": "string", "description": "This rule's code/identifier." }, "url": { "type": "string", "description": "A URL to open with more information about this rule code.\n Optional." } }, "additionalProperties": true, "type": "object", "description": "This diagnostic's rule code.\n Optional." }, "suggestions": { "items": { "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "range": { "$ref": "reviewdog.rdf.Range", "additionalProperties": true, "type": "object", "description": "Range at which this suggestion applies.\n To insert text into a document create a range where start == end." }, "text": { "type": "string", "description": "A suggested text which replace the range.\n For delete operations use an empty string." } }, "additionalProperties": true, "type": "object", "description": "Suggestion represents a suggested text manipulation to resolve a diagnostic\n problem.\n\n Insert example ('hayabusa' -\u003e 'haya15busa'):\n range {\n start {\n line: 1\n column: 5\n }\n end {\n line: 1\n column: 5\n }\n }\n text: 15\n |h|a|y|a|b|u|s|a|\n 1 2 3 4 5 6 7 8 9\n ^--- insert '15'\n\n Update example ('haya15busa' -\u003e 'haya14busa'):\n range {\n start {\n line: 1\n column: 5\n }\n end {\n line: 1\n column: 7\n }\n }\n text: 14\n |h|a|y|a|1|5|b|u|s|a|\n 1 2 3 4 5 6 7 8 9 0 1\n ^---^ replace with '14'" }, "type": "array", "description": "Suggested fixes to resolve this diagnostic.\n Optional." }, "original_output": { "type": "string", "description": "Experimental: If this diagnostic is converted from other formats,\n original_output represents the original output which corresponds to this\n diagnostic.\n Optional." } }, "additionalProperties": true, "type": "object", "description": "Represents a diagnostic, such as a compiler error or warning.\n It's intended to be used as structured format which represents a\n diagnostic and can be used as stream of input/output such as jsonl.\n This message should be self-contained to report a diagnostic." }, "type": "array" }, "source": { "$ref": "reviewdog.rdf.Source", "additionalProperties": true, "type": "object", "description": "The source of diagnostics, e.g. 'typescript' or 'super lint'.\n Optional." }, "severity": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "description": "This diagnostics' overall severity.\n Optional." } }, "additionalProperties": true, "type": "object", "description": "Result of diagnostic tool such as a compiler or a linter.\n It's intended to be used as top-level structured format which represents a\n whole result of a diagnostic tool.", "definitions": { "reviewdog.rdf.Position": { "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "line": { "type": "integer", "description": "Line number, starting at 1.\n Optional." }, "column": { "type": "integer", "description": "Column number, starting at 1 (byte count in UTF-8).\n Example: 'a𐐀b'\n The column of a: 1\n The column of 𐐀: 2\n The column of b: 6 since 𐐀 is represented with 4 bytes in UTF-8.\n Optional." } }, "additionalProperties": true, "type": "object", "id": "reviewdog.rdf.Position" }, "reviewdog.rdf.Range": { "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "start": { "$ref": "reviewdog.rdf.Position", "additionalProperties": true, "type": "object", "description": "Required." }, "end": { "$ref": "reviewdog.rdf.Position", "additionalProperties": true, "type": "object", "description": "end can be omitted. Then the range is handled as zero-length (start == end).\n Optional." } }, "additionalProperties": true, "type": "object", "description": "A range in a text document expressed as start and end positions.\n\nThe end position is *exclusive*. It might be a bit unnatural for you or for\n some diagnostic tools to use exlusive range, but it's necessary to represent\n zero-width range especially when using it in Suggestion context to support\n code insertion.\n Example: \"14\" in \"haya14busa\"\n start: { line: 1, column: 5 }\n end: { line: 1, column: 7 } # \u003c= Exclusive\n\n |h|a|y|a|1|4|b|u|s|a|\n 1 2 3 4 5 6 7 8 9 0 1\n ^---^\n haya14busa\n ^^\n\n If you want to specify a range that\n contains a line including the line ending character(s), then use an end\n position denoting the start of the next line.\n Example:\n start: { line: 5, column: 23 }\n end: { line: 6, column: 1 }\n\n If both start and end position omit column value, it's\n handled as linewise and the range includes end position (line) as well.\n Example:\n start: { line: 5 }\n end: { line: 6 }\n The above example represents range start from line 5 to the end of line 6\n including EOL.\n\n Examples for line range:\n Text example. \u003cline\u003e|\u003cline content\u003e(line breaking)\n 1|abc\\r\\n\n 2|def\\r\\n\n 3|ghi\\r\\n\n\n start: { line: 2 }\n =\u003e \"abc\"\n\n start: { line: 2 }\n end: { line: 2 }\n =\u003e \"abc\"\n\n start: { line: 2 }\n end: { line: 3 }\n =\u003e \"abc\\r\\ndef\"\n\n start: { line: 2 }\n end: { line: 3, column: 1 }\n =\u003e \"abc\\r\\n\"\n\nstart: { line: 2, column: 1 }\n end: { line: 2, column: 4 }\n =\u003e \"abc\" (without line-break)", "id": "reviewdog.rdf.Range" }, "reviewdog.rdf.Source": { "$schema": "http://json-schema.org/draft-04/schema#", "properties": { "name": { "type": "string", "description": "A human-readable string describing the source of diagnostics, e.g.\n 'typescript' or 'super lint'." }, "url": { "type": "string", "description": "URL to this source.\n Optional." } }, "additionalProperties": true, "type": "object", "id": "reviewdog.rdf.Source" } } }