mirror of
https://github.com/github/semantic.git
synced 2024-12-24 07:25:44 +03:00
728 lines
24 KiB
JSON
728 lines
24 KiB
JSON
[{
|
|
"testCaseDescription": "go-variadic-function-declarations-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f1' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f2' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f3' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index e69de29..e9d461f 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -0,0 +1,3 @@",
|
|
"+func f1(a ...*int) {}",
|
|
"+func f2(...int) {}",
|
|
"+func f3(a, ...bool) {}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "e9dcc5ff4238d41530483c4449c00d80e1d3c35f..7e5a2b222958264d5bdc2fe45d23ca2eeb85f7e7"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-variadic-function-declarations-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'g1' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'g2' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'g3' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f1' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f2' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'f3' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index e9d461f..1e4f816 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -1,3 +1,9 @@",
|
|
"+func g1(a ...*int) {}",
|
|
"+func g2(...int) {}",
|
|
"+func g3(a, ...bool) {}",
|
|
"+func f1(a ...*int) {}",
|
|
"+func f2(...int) {}",
|
|
"+func f3(a, ...bool) {}",
|
|
" func f1(a ...*int) {}",
|
|
" func f2(...int) {}",
|
|
" func f3(a, ...bool) {}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "7e5a2b222958264d5bdc2fe45d23ca2eeb85f7e7..6b31d4fe456ff0585c96556248520d3d5be4a522"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-variadic-function-declarations-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
6
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
6
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'g1' identifier with the 'f1' identifier in the f1 function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
6
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
6
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'g2' identifier with the 'f2' identifier in the f2 function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'g3' identifier with the 'f3' identifier in the f3 function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index 1e4f816..3198ec6 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
"-func g1(a ...*int) {}",
|
|
"-func g2(...int) {}",
|
|
"-func g3(a, ...bool) {}",
|
|
"+func f1(a ...*int) {}",
|
|
"+func f2(...int) {}",
|
|
"+func f3(a, ...bool) {}",
|
|
" func f1(a ...*int) {}",
|
|
" func f2(...int) {}",
|
|
" func f3(a, ...bool) {}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "6b31d4fe456ff0585c96556248520d3d5be4a522..9010e097214adcfd591d99ae13c5df975661ce32"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-variadic-function-declarations-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
6
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
6
|
|
],
|
|
"end": [
|
|
1,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'f1' identifier with the 'g1' identifier in the g1 function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
6
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
6
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'f2' identifier with the 'g2' identifier in the g2 function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
6
|
|
],
|
|
"end": [
|
|
3,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'f3' identifier with the 'g3' identifier in the g3 function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index 3198ec6..1e4f816 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -1,6 +1,6 @@",
|
|
"-func f1(a ...*int) {}",
|
|
"-func f2(...int) {}",
|
|
"-func f3(a, ...bool) {}",
|
|
"+func g1(a ...*int) {}",
|
|
"+func g2(...int) {}",
|
|
"+func g3(a, ...bool) {}",
|
|
" func f1(a ...*int) {}",
|
|
" func f2(...int) {}",
|
|
" func f3(a, ...bool) {}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "9010e097214adcfd591d99ae13c5df975661ce32..b08f4a4eaef9a78b29a39045318588ed306fc61e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-variadic-function-declarations-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'g1' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'g2' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'g3' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f1' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f2' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f3' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'g1' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'g2' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'g3' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index 1e4f816..99d1e54 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -1,9 +1,6 @@",
|
|
"-func g1(a ...*int) {}",
|
|
"-func g2(...int) {}",
|
|
"-func g3(a, ...bool) {}",
|
|
"-func f1(a ...*int) {}",
|
|
"-func f2(...int) {}",
|
|
"-func f3(a, ...bool) {}",
|
|
" func f1(a ...*int) {}",
|
|
" func f2(...int) {}",
|
|
" func f3(a, ...bool) {}",
|
|
"+func g1(a ...*int) {}",
|
|
"+func g2(...int) {}",
|
|
"+func g3(a, ...bool) {}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "b08f4a4eaef9a78b29a39045318588ed306fc61e..1131fc01246f4d088e7aec755ebde4ece8714aac"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-variadic-function-declarations-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f1' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f2' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'f3' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index 99d1e54..4a0a10b 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -1,6 +1,3 @@",
|
|
"-func f1(a ...*int) {}",
|
|
"-func f2(...int) {}",
|
|
"-func f3(a, ...bool) {}",
|
|
" func g1(a ...*int) {}",
|
|
" func g2(...int) {}",
|
|
" func g3(a, ...bool) {}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "1131fc01246f4d088e7aec755ebde4ece8714aac..cdbe3973855bc433202b3975dddff92e0ecf5c61"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-variadic-function-declarations-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"variadic-function-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
22
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'g1' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
19
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'g2' function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'g3' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"variadic-function-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/variadic-function-declarations.go b/variadic-function-declarations.go",
|
|
"index 4a0a10b..e69de29 100644",
|
|
"--- a/variadic-function-declarations.go",
|
|
"+++ b/variadic-function-declarations.go",
|
|
"@@ -1,3 +0,0 @@",
|
|
"-func g1(a ...*int) {}",
|
|
"-func g2(...int) {}",
|
|
"-func g3(a, ...bool) {}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "cdbe3973855bc433202b3975dddff92e0ecf5c61..f7fca3cafb4b39a7a9a7501cb3f2c065cfe652d2"
|
|
}]
|