mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +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": "f0a73216049e6ab58b59527f4f115ed466441a09..a4fdff8991f0972c0b327334c65c1b5b71102bd3"
|
|
}
|
|
,{
|
|
"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": "a4fdff8991f0972c0b327334c65c1b5b71102bd3..15ac0557e8867686f21cdaa5f05074cf3c38d9da"
|
|
}
|
|
,{
|
|
"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": "15ac0557e8867686f21cdaa5f05074cf3c38d9da..230f9f52816578931ac090b29ff6e4a242d86db9"
|
|
}
|
|
,{
|
|
"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": "230f9f52816578931ac090b29ff6e4a242d86db9..69181782eaf3618003e55b96c7c821ae38531df9"
|
|
}
|
|
,{
|
|
"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": "69181782eaf3618003e55b96c7c821ae38531df9..5333e115cbf88a7540c8df822a1472ee4b89b7f6"
|
|
}
|
|
,{
|
|
"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": "5333e115cbf88a7540c8df822a1472ee4b89b7f6..e35af7a99f36ae0eeac753a0e376ed3b58ded892"
|
|
}
|
|
,{
|
|
"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": "e35af7a99f36ae0eeac753a0e376ed3b58ded892..3c45cc8ca3df829def1c771c316976799dea5d60"
|
|
}]
|