mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
533 lines
17 KiB
JSON
533 lines
17 KiB
JSON
[{
|
|
"testCaseDescription": "go-short-var-declarations-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"sha1": "a87789c4ba756c69611642c5ff1d87406a577d2b",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "6363166dc4c64d45a80e6ebd1df7881bcf4080f3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-short-var-declarations-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
1
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'main' module with the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"sha1": "6363166dc4c64d45a80e6ebd1df7881bcf4080f3",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "cde63d409aa3447c8d1eacf38c424d667f3500c2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-short-var-declarations-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
9
|
|
],
|
|
"end": [
|
|
3,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
9
|
|
],
|
|
"end": [
|
|
3,
|
|
10
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '3' with '1' in the a variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
4
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
4
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'y' identifier with the 'b' identifier in the b variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
12
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
12
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '4' with '2' in the b variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"sha1": "cde63d409aa3447c8d1eacf38c424d667f3500c2",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "c89898f4df9a0a395955069c33a4d9c40c2ded0d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-short-var-declarations-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
9
|
|
],
|
|
"end": [
|
|
3,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
9
|
|
],
|
|
"end": [
|
|
3,
|
|
10
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '1' with '3' in the x variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
4
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
4
|
|
],
|
|
"end": [
|
|
3,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'y' identifier in the y variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
12
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
12
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '2' with '4' in the y variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"sha1": "c89898f4df9a0a395955069c33a4d9c40c2ded0d",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "5dd980a2f898fccf4a00d8969f93aac7da53a1f6"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-short-var-declarations-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"sha1": "5dd980a2f898fccf4a00d8969f93aac7da53a1f6",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "c08905fa95c34e95b6224b87ea5bc1df704d8ac4"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-short-var-declarations-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
1
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'main' module with the 'main' module"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"sha1": "c08905fa95c34e95b6224b87ea5bc1df704d8ac4",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "711d6d788ac0467b9f015ce74dc5921e495b5137"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-short-var-declarations-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"sha1": "711d6d788ac0467b9f015ce74dc5921e495b5137",
|
|
"gitDir": "test/corpus/repos/go",
|
|
"sha2": "92d5914413ee0832e41c2d941d609e3bee021a8d"
|
|
}]
|