-
Notifications
You must be signed in to change notification settings - Fork 0
/
RelatedLocation.json
71 lines (71 loc) · 5.43 KB
/
RelatedLocation.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/RelatedLocation",
"definitions": {
"RelatedLocation": {
"properties": {
"message": {
"type": "string",
"description": "Explanation of this related location. Optional."
},
"location": {
"$ref": "#/definitions/reviewdog.rdf.Location",
"additionalProperties": true,
"description": "Required."
}
},
"additionalProperties": true,
"type": "object",
"title": "Related Location"
},
"reviewdog.rdf.Location": {
"properties": {
"path": {
"type": "string",
"description": "File path. It could be either absolute path or relative path."
},
"range": {
"$ref": "#/definitions/reviewdog.rdf.Range",
"additionalProperties": true,
"description": "Range in the file path. Optional."
}
},
"additionalProperties": true,
"type": "object",
"title": "Location"
},
"reviewdog.rdf.Position": {
"properties": {
"line": {
"type": "integer",
"description": "Line number, starting at 1. Optional."
},
"column": {
"type": "integer",
"description": "Column number, starting at 1 (byte count in UTF-8). Example: 'a𐐀b' The column of a: 1 The column of 𐐀: 2 The column of b: 6 since 𐐀 is represented with 4 bytes in UTF-8. Optional."
}
},
"additionalProperties": true,
"type": "object",
"title": "Position"
},
"reviewdog.rdf.Range": {
"properties": {
"start": {
"$ref": "#/definitions/reviewdog.rdf.Position",
"additionalProperties": true,
"description": "Required."
},
"end": {
"$ref": "#/definitions/reviewdog.rdf.Position",
"additionalProperties": true,
"description": "end can be omitted. Then the range is handled as zero-length (start == end). Optional."
}
},
"additionalProperties": true,
"type": "object",
"title": "The 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\"",
"description": "A range in a text document expressed as start and end positions. The end position is *exclusive*. It might be a bit unnatural for you or for some diagnostic tools to use exclusive range, but it's necessary to represent zero-width range especially when using it in Suggestion context to support code insertion. Example: \"14\" in \"haya14busa\" start: { line: 1, column: 5 } end: { line: 1, column: 7 } # \u003c= Exclusive |h|a|y|a|1|4|b|u|s|a| 1 2 3 4 5 6 7 8 9 0 1 ^---^ haya14busa ^^ If you want to specify a range that contains a line including the line ending character(s), then use an end position denoting the start of the next line. Example: start: { line: 5, column: 23 } end: { line: 6, column: 1 } If both start and end position omit column value, it's handled as linewise and the range includes end position (line) as well. Example: start: { line: 5 } end: { line: 6 } The above example represents range start from line 5 to the end of line 6 including EOL. Examples for line range: Text example. \u003cline\u003e|\u003cline content\u003e(line breaking) 1|abc\\r\\n 2|def\\r\\n 3|ghi\\r\\n start: { line: 2 } =\u003e \"abc\" start: { line: 2 } end: { line: 2 } =\u003e \"abc\" start: { line: 2 } end: { line: 3 } =\u003e \"abc\\r\\ndef\" start: { line: 2 } end: { line: 3, column: 1 } =\u003e \"abc\\r\\n\" start: { line: 2, column: 1 } end: { line: 2, column: 4 } =\u003e \"abc\" (without line-break)"
}
}
}