mirror of
https://github.com/github/semantic.git
synced 2024-12-23 23:11:50 +03:00
1013 lines
35 KiB
JSON
1013 lines
35 KiB
JSON
[{
|
|
"testCaseDescription": "go-struct-literals-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"struct-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'variable' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"sha1": "b8ab52c67b64545630b064786a830245f0f3e923",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "b434b1a69a73265e8d0260dc130152a462c728cd"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-struct-literals-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"struct-literals.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
34
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
9,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
13,
|
|
1
|
|
],
|
|
"end": [
|
|
13,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
14,
|
|
1
|
|
],
|
|
"end": [
|
|
14,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'variable' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"sha1": "b434b1a69a73265e8d0260dc130152a462c728cd",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "63a0f9b603fbf5ba917d650380568555839d62f9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-struct-literals-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"struct-literals.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
12
|
|
],
|
|
"end": [
|
|
3,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
12
|
|
],
|
|
"end": [
|
|
3,
|
|
18
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'Dog' identifier with the 'Person' identifier in the const s1 = Person{\nname: \"Frank\",\nAge: \"5 months\",\n} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
12
|
|
],
|
|
"end": [
|
|
3,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
12
|
|
],
|
|
"end": [
|
|
3,
|
|
18
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'Dog' identifier with the 'Person' identifier in the const s1 = Person{\nname: \"Frank\",\nAge: \"5 months\",\n} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
21
|
|
],
|
|
"end": [
|
|
7,
|
|
26
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
21
|
|
],
|
|
"end": [
|
|
7,
|
|
24
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'float' identifier with the 'int' identifier in the const s2 = struct{i int;}{i: 5} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
29
|
|
],
|
|
"end": [
|
|
7,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
27
|
|
],
|
|
"end": [
|
|
7,
|
|
28
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'j' identifier with the 'i' identifier in the const s2 = struct{i int;}{i: 5} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
32
|
|
],
|
|
"end": [
|
|
7,
|
|
33
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
30
|
|
],
|
|
"end": [
|
|
7,
|
|
31
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '6' with '5' in the const s2 = struct{i int;}{i: 5} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
21
|
|
],
|
|
"end": [
|
|
7,
|
|
26
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
21
|
|
],
|
|
"end": [
|
|
7,
|
|
24
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'float' identifier with the 'int' identifier in the const s2 = struct{i int;}{i: 5} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
29
|
|
],
|
|
"end": [
|
|
7,
|
|
30
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
27
|
|
],
|
|
"end": [
|
|
7,
|
|
28
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'j' identifier with the 'i' identifier in the const s2 = struct{i int;}{i: 5} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
32
|
|
],
|
|
"end": [
|
|
7,
|
|
33
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
30
|
|
],
|
|
"end": [
|
|
7,
|
|
31
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '6' with '5' in the const s2 = struct{i int;}{i: 5} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
8,
|
|
17
|
|
],
|
|
"end": [
|
|
8,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
8,
|
|
17
|
|
],
|
|
"end": [
|
|
8,
|
|
21
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'Month' identifier with the 'Time' identifier in the const s3 = time.Time{} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
8,
|
|
17
|
|
],
|
|
"end": [
|
|
8,
|
|
22
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
8,
|
|
17
|
|
],
|
|
"end": [
|
|
8,
|
|
21
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'Month' identifier with the 'Time' identifier in the const s3 = time.Time{} variable of the 'main' module statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"sha1": "63a0f9b603fbf5ba917d650380568555839d62f9",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "e4fa15197ec7371dee80168be85e06984c3a6707"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-struct-literals-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"struct-literals.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
12
|
|
],
|
|
"end": [
|
|
3,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
12
|
|
],
|
|
"end": [
|
|
3,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'Person' identifier with the 'Dog' identifier in the const s1 = Dog{\nname: \"Frank\",\nAge: \"5 months\",\n} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
12
|
|
],
|
|
"end": [
|
|
3,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
12
|
|
],
|
|
"end": [
|
|
3,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'Person' identifier with the 'Dog' identifier in the const s1 = Dog{\nname: \"Frank\",\nAge: \"5 months\",\n} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
21
|
|
],
|
|
"end": [
|
|
7,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
21
|
|
],
|
|
"end": [
|
|
7,
|
|
26
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'int' identifier with the 'float' identifier in the const s2 = struct{i float;}{j: 6} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
27
|
|
],
|
|
"end": [
|
|
7,
|
|
28
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
29
|
|
],
|
|
"end": [
|
|
7,
|
|
30
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'i' identifier with the 'j' identifier in the const s2 = struct{i float;}{j: 6} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
30
|
|
],
|
|
"end": [
|
|
7,
|
|
31
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
32
|
|
],
|
|
"end": [
|
|
7,
|
|
33
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '5' with '6' in the const s2 = struct{i float;}{j: 6} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
21
|
|
],
|
|
"end": [
|
|
7,
|
|
24
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
21
|
|
],
|
|
"end": [
|
|
7,
|
|
26
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'int' identifier with the 'float' identifier in the const s2 = struct{i float;}{j: 6} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
27
|
|
],
|
|
"end": [
|
|
7,
|
|
28
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
29
|
|
],
|
|
"end": [
|
|
7,
|
|
30
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'i' identifier with the 'j' identifier in the const s2 = struct{i float;}{j: 6} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
30
|
|
],
|
|
"end": [
|
|
7,
|
|
31
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
32
|
|
],
|
|
"end": [
|
|
7,
|
|
33
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '5' with '6' in the const s2 = struct{i float;}{j: 6} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
8,
|
|
17
|
|
],
|
|
"end": [
|
|
8,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
8,
|
|
17
|
|
],
|
|
"end": [
|
|
8,
|
|
22
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'Time' identifier with the 'Month' identifier in the const s3 = time.Month{} variable of the 'main' module statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
8,
|
|
17
|
|
],
|
|
"end": [
|
|
8,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
8,
|
|
17
|
|
],
|
|
"end": [
|
|
8,
|
|
22
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'Time' identifier with the 'Month' identifier in the const s3 = time.Month{} variable of the 'main' module statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"sha1": "e4fa15197ec7371dee80168be85e06984c3a6707",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "e92f76704b26457820bd4c9c995ef1e983fd4011"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-struct-literals-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"struct-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
34
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
9,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
13,
|
|
1
|
|
],
|
|
"end": [
|
|
13,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
14,
|
|
1
|
|
],
|
|
"end": [
|
|
14,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
9,
|
|
1
|
|
],
|
|
"end": [
|
|
12,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
13,
|
|
1
|
|
],
|
|
"end": [
|
|
13,
|
|
34
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
14,
|
|
1
|
|
],
|
|
"end": [
|
|
14,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'variable' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"sha1": "e92f76704b26457820bd4c9c995ef1e983fd4011",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "daf8d5af44b75ad2878648c942abdfb4e5637125"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-struct-literals-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"struct-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'variable' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"sha1": "daf8d5af44b75ad2878648c942abdfb4e5637125",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "e0b6017009a3ec21e9fe3a96d1f7cf222a198a0b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-struct-literals-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"struct-literals.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
7,
|
|
1
|
|
],
|
|
"end": [
|
|
7,
|
|
34
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'variable' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
8,
|
|
1
|
|
],
|
|
"end": [
|
|
8,
|
|
24
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'variable' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"struct-literals.go"
|
|
],
|
|
"sha1": "e0b6017009a3ec21e9fe3a96d1f7cf222a198a0b",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "616dc60f58ad6bbb761acecac0e8319c4df5a3e0"
|
|
}]
|