github.com/mistwind/reviewdog@v0.0.0-20230322024206-9cfa11856d58/proto/rdf/jsonschema/DiagnosticResult.jsonschema (about)

     1  {
     2      "$schema": "http://json-schema.org/draft-04/schema#",
     3      "properties": {
     4          "diagnostics": {
     5              "items": {
     6                  "$schema": "http://json-schema.org/draft-04/schema#",
     7                  "properties": {
     8                      "message": {
     9                          "type": "string",
    10                          "description": "The diagnostic's message."
    11                      },
    12                      "location": {
    13                          "properties": {
    14                              "path": {
    15                                  "type": "string",
    16                                  "description": "File path. It could be either absolute path or relative path."
    17                              },
    18                              "range": {
    19                                  "$ref": "reviewdog.rdf.Range",
    20                                  "additionalProperties": true,
    21                                  "type": "object",
    22                                  "description": "Range in the file path.\n Optional."
    23                              }
    24                          },
    25                          "additionalProperties": true,
    26                          "type": "object",
    27                          "description": "Location at which this diagnostic message applies."
    28                      },
    29                      "severity": {
    30                          "oneOf": [
    31                              {
    32                                  "type": "string"
    33                              },
    34                              {
    35                                  "type": "integer"
    36                              }
    37                          ],
    38                          "description": "This diagnostic's severity.\n Optional."
    39                      },
    40                      "source": {
    41                          "$ref": "reviewdog.rdf.Source",
    42                          "additionalProperties": true,
    43                          "type": "object",
    44                          "description": "The source of this diagnostic, e.g. 'typescript' or 'super lint'.\n Optional."
    45                      },
    46                      "code": {
    47                          "properties": {
    48                              "value": {
    49                                  "type": "string",
    50                                  "description": "This rule's code/identifier."
    51                              },
    52                              "url": {
    53                                  "type": "string",
    54                                  "description": "A URL to open with more information about this rule code.\n Optional."
    55                              }
    56                          },
    57                          "additionalProperties": true,
    58                          "type": "object",
    59                          "description": "This diagnostic's rule code.\n Optional."
    60                      },
    61                      "suggestions": {
    62                          "items": {
    63                              "$schema": "http://json-schema.org/draft-04/schema#",
    64                              "properties": {
    65                                  "range": {
    66                                      "$ref": "reviewdog.rdf.Range",
    67                                      "additionalProperties": true,
    68                                      "type": "object",
    69                                      "description": "Range at which this suggestion applies.\n To insert text into a document create a range where start == end."
    70                                  },
    71                                  "text": {
    72                                      "type": "string",
    73                                      "description": "A suggested text which replace the range.\n For delete operations use an empty string."
    74                                  }
    75                              },
    76                              "additionalProperties": true,
    77                              "type": "object",
    78                              "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'"
    79                          },
    80                          "type": "array",
    81                          "description": "Suggested fixes to resolve this diagnostic.\n Optional."
    82                      },
    83                      "original_output": {
    84                          "type": "string",
    85                          "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."
    86                      }
    87                  },
    88                  "additionalProperties": true,
    89                  "type": "object",
    90                  "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."
    91              },
    92              "type": "array"
    93          },
    94          "source": {
    95              "$ref": "reviewdog.rdf.Source",
    96              "additionalProperties": true,
    97              "type": "object",
    98              "description": "The source of diagnostics, e.g. 'typescript' or 'super lint'.\n Optional."
    99          },
   100          "severity": {
   101              "oneOf": [
   102                  {
   103                      "type": "string"
   104                  },
   105                  {
   106                      "type": "integer"
   107                  }
   108              ],
   109              "description": "This diagnostics' overall severity.\n Optional."
   110          }
   111      },
   112      "additionalProperties": true,
   113      "type": "object",
   114      "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.",
   115      "definitions": {
   116          "reviewdog.rdf.Position": {
   117              "$schema": "http://json-schema.org/draft-04/schema#",
   118              "properties": {
   119                  "line": {
   120                      "type": "integer",
   121                      "description": "Line number, starting at 1.\n Optional."
   122                  },
   123                  "column": {
   124                      "type": "integer",
   125                      "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."
   126                  }
   127              },
   128              "additionalProperties": true,
   129              "type": "object",
   130              "id": "reviewdog.rdf.Position"
   131          },
   132          "reviewdog.rdf.Range": {
   133              "$schema": "http://json-schema.org/draft-04/schema#",
   134              "properties": {
   135                  "start": {
   136                      "$ref": "reviewdog.rdf.Position",
   137                      "additionalProperties": true,
   138                      "type": "object",
   139                      "description": "Required."
   140                  },
   141                  "end": {
   142                      "$ref": "reviewdog.rdf.Position",
   143                      "additionalProperties": true,
   144                      "type": "object",
   145                      "description": "end can be omitted. Then the range is handled as zero-length (start == end).\n Optional."
   146                  }
   147              },
   148              "additionalProperties": true,
   149              "type": "object",
   150              "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 exclusive 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)",
   151              "id": "reviewdog.rdf.Range"
   152          },
   153          "reviewdog.rdf.Source": {
   154              "$schema": "http://json-schema.org/draft-04/schema#",
   155              "properties": {
   156                  "name": {
   157                      "type": "string",
   158                      "description": "A human-readable string describing the source of diagnostics, e.g.\n 'typescript' or 'super lint'."
   159                  },
   160                  "url": {
   161                      "type": "string",
   162                      "description": "URL to this source.\n Optional."
   163                  }
   164              },
   165              "additionalProperties": true,
   166              "type": "object",
   167              "id": "reviewdog.rdf.Source"
   168          }
   169      }
   170  }