mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
630 lines
20 KiB
JSON
630 lines
20 KiB
JSON
[{
|
|
"testCaseDescription": "go-short-var-declarations-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
|
"index e69de29..99b7041 100644",
|
|
"--- a/short-var-declarations.go",
|
|
"+++ b/short-var-declarations.go",
|
|
"@@ -0,0 +1 @@",
|
|
"+a, b := 1, 2"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "d77b70cb3981afaf807f3e56652ecd386101cb2b..923c4c5fcf1002927a78d428eefab190c7e2c730"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-short-var-declarations-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
|
"index 99b7041..220aab8 100644",
|
|
"--- a/short-var-declarations.go",
|
|
"+++ b/short-var-declarations.go",
|
|
"@@ -1 +1,3 @@",
|
|
"+x, y := 3, 4",
|
|
"+a, b := 1, 2",
|
|
" a, b := 1, 2"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "923c4c5fcf1002927a78d428eefab190c7e2c730..62e0fff2590e53bca217d3b3fb46c7f6f86822c1"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-short-var-declarations-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
9
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
9
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '3' with '1' in the a variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
4
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
4
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'y' identifier with the 'b' identifier in the b variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
12
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
12
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '4' with '2' in the b variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
|
"index 220aab8..96ba966 100644",
|
|
"--- a/short-var-declarations.go",
|
|
"+++ b/short-var-declarations.go",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-x, y := 3, 4",
|
|
"+a, b := 1, 2",
|
|
" a, b := 1, 2",
|
|
" a, b := 1, 2"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "62e0fff2590e53bca217d3b3fb46c7f6f86822c1..ca28a3beeb3b19e152ad702d5c8ba7d4abcb87e2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-short-var-declarations-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
2
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
9
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
9
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '1' with '3' in the x variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
4
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
4
|
|
],
|
|
"end": [
|
|
1,
|
|
5
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'y' identifier in the y variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
12
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
12
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced '2' with '4' in the y variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
|
"index 96ba966..220aab8 100644",
|
|
"--- a/short-var-declarations.go",
|
|
"+++ b/short-var-declarations.go",
|
|
"@@ -1,3 +1,3 @@",
|
|
"-a, b := 1, 2",
|
|
"+x, y := 3, 4",
|
|
" a, b := 1, 2",
|
|
" a, b := 1, 2"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "ca28a3beeb3b19e152ad702d5c8ba7d4abcb87e2..601d4dd43130450c08e7e7b34bc3b35cd6df83cc"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-short-var-declarations-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'y' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
|
"index 220aab8..53cb4ed 100644",
|
|
"--- a/short-var-declarations.go",
|
|
"+++ b/short-var-declarations.go",
|
|
"@@ -1,3 +1,2 @@",
|
|
"-x, y := 3, 4",
|
|
"-a, b := 1, 2",
|
|
" a, b := 1, 2",
|
|
"+x, y := 3, 4"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "601d4dd43130450c08e7e7b34bc3b35cd6df83cc..b494ce9f37460cdcc5f62dbf78571c0e1134ce60"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-short-var-declarations-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
|
"index 53cb4ed..9209ec7 100644",
|
|
"--- a/short-var-declarations.go",
|
|
"+++ b/short-var-declarations.go",
|
|
"@@ -1,2 +1 @@",
|
|
"-a, b := 1, 2",
|
|
" x, y := 3, 4"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "b494ce9f37460cdcc5f62dbf78571c0e1134ce60..6943eb4765b07143acf4bead143f4e9927d67e74"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-short-var-declarations-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"short-var-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'x' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'y' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"short-var-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/short-var-declarations.go b/short-var-declarations.go",
|
|
"index 9209ec7..e69de29 100644",
|
|
"--- a/short-var-declarations.go",
|
|
"+++ b/short-var-declarations.go",
|
|
"@@ -1 +0,0 @@",
|
|
"-x, y := 3, 4"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "6943eb4765b07143acf4bead143f4e9927d67e74..b47f159a4e69c481019748b1b4451ca5480b48ac"
|
|
}]
|