1
1
mirror of https://github.com/github/semantic.git synced 2024-12-23 14:54:16 +03:00
semantic/test/corpus/diff-summaries/go/short-var-declarations.json

630 lines
20 KiB
JSON
Raw Normal View History

2016-11-02 17:50:05 +03:00
[{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-short-var-declarations-insert-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
13
2016-11-02 21:37:30 +03:00
]
}
},
2016-11-02 23:46:17 +03:00
"summary": "Added the 'a' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
1
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
13
2016-11-02 17:50:05 +03:00
]
}
},
2016-11-02 23:46:17 +03:00
"summary": "Added the 'b' variable"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"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"
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "d77b70cb3981afaf807f3e56652ecd386101cb2b..923c4c5fcf1002927a78d428eefab190c7e2c730"
2016-11-02 17:50:05 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-short-var-declarations-replacement-insert-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
2016-11-11 00:19:53 +03:00
"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
]
}
2016-11-02 17:50:05 +03:00
},
2016-11-11 00:19:53 +03:00
"summary": "Added the 'b' variable"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"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"
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "923c4c5fcf1002927a78d428eefab190c7e2c730..62e0fff2590e53bca217d3b3fb46c7f6f86822c1"
2016-11-02 17:50:05 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-short-var-declarations-delete-insert-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
2
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
2
]
}
]
},
2016-11-02 23:46:17 +03:00
"summary": "Replaced the 'x' identifier with the 'a' identifier in the a variable"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
9
2016-11-02 17:50:05 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
10
2016-11-02 17:50:05 +03:00
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
9
2016-11-02 17:50:05 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
10
2016-11-02 17:50:05 +03:00
]
}
]
},
2016-11-02 23:46:17 +03:00
"summary": "Replaced '3' with '1' in the a variable"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
4
2016-11-02 17:50:05 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
5
2016-11-02 17:50:05 +03:00
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
4
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
5
2016-11-02 21:37:30 +03:00
]
}
]
},
2016-11-02 23:46:17 +03:00
"summary": "Replaced the 'y' identifier with the 'b' identifier in the b variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
12
2016-11-02 17:50:05 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
13
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
12
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
13
2016-11-02 17:50:05 +03:00
]
}
]
},
2016-11-02 23:46:17 +03:00
"summary": "Replaced '4' with '2' in the b variable"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"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"
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "62e0fff2590e53bca217d3b3fb46c7f6f86822c1..ca28a3beeb3b19e152ad702d5c8ba7d4abcb87e2"
2016-11-02 17:50:05 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-short-var-declarations-replacement-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
2
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
2
]
}
]
},
2016-11-02 23:46:17 +03:00
"summary": "Replaced the 'a' identifier with the 'x' identifier in the x variable"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
9
2016-11-02 17:50:05 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
10
2016-11-02 17:50:05 +03:00
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
9
2016-11-02 17:50:05 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
10
2016-11-02 17:50:05 +03:00
]
}
]
},
2016-11-02 23:46:17 +03:00
"summary": "Replaced '1' with '3' in the x variable"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
4
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
5
2016-11-02 21:37:30 +03:00
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
4
2016-11-02 17:50:05 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
5
2016-11-02 21:37:30 +03:00
]
}
]
},
2016-11-02 23:46:17 +03:00
"summary": "Replaced the 'b' identifier with the 'y' identifier in the y variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
12
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
13
2016-11-02 17:50:05 +03:00
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
12
2016-11-02 17:50:05 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
13
2016-11-02 17:50:05 +03:00
]
}
]
},
2016-11-02 23:46:17 +03:00
"summary": "Replaced '2' with '4' in the y variable"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"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"
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "ca28a3beeb3b19e152ad702d5c8ba7d4abcb87e2..601d4dd43130450c08e7e7b34bc3b35cd6df83cc"
2016-11-02 17:50:05 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-short-var-declarations-delete-replacement-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
13
2016-11-02 21:37:30 +03:00
]
}
},
2016-11-02 23:46:17 +03:00
"summary": "Deleted the 'x' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
1
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
13
2016-11-02 17:50:05 +03:00
]
}
},
2016-11-02 23:46:17 +03:00
"summary": "Deleted the 'y' variable"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 23:46:17 +03:00
13
2016-11-02 21:37:30 +03:00
]
}
},
2016-11-02 23:46:17 +03:00
"summary": "Deleted the 'a' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 23:46:17 +03:00
1
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
13
2016-11-02 17:50:05 +03:00
]
}
},
2016-11-02 23:46:17 +03:00
"summary": "Deleted the 'b' variable"
2016-11-02 17:50:05 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 23:46:17 +03:00
13
2016-11-02 21:37:30 +03:00
]
}
},
2016-11-02 23:46:17 +03:00
"summary": "Added the 'x' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 23:46:17 +03:00
1
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 21:37:30 +03:00
13
2016-11-02 17:50:05 +03:00
]
}
},
2016-11-02 23:46:17 +03:00
"summary": "Added the 'y' variable"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"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"
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "601d4dd43130450c08e7e7b34bc3b35cd6df83cc..b494ce9f37460cdcc5f62dbf78571c0e1134ce60"
2016-11-02 17:50:05 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-short-var-declarations-delete-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
2016-11-11 00:19:53 +03:00
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
},
"summary": "Deleted the 'a' variable"
},
{
"span": {
"delete": {
"start": [
1,
1
],
"end": [
1,
13
]
}
2016-11-02 17:50:05 +03:00
},
2016-11-11 00:19:53 +03:00
"summary": "Deleted the 'b' variable"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"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"
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "b494ce9f37460cdcc5f62dbf78571c0e1134ce60..6943eb4765b07143acf4bead143f4e9927d67e74"
2016-11-02 17:50:05 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-short-var-declarations-delete-rest-test",
2016-11-02 17:50:05 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"short-var-declarations.go": [
2016-11-02 17:50:05 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 17:50:05 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
13
2016-11-02 21:37:30 +03:00
]
}
},
2016-11-02 23:46:17 +03:00
"summary": "Deleted the 'x' variable"
2016-11-02 21:37:30 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 23:46:17 +03:00
1
2016-11-02 21:37:30 +03:00
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 21:37:30 +03:00
13
2016-11-02 17:50:05 +03:00
]
}
},
2016-11-02 23:46:17 +03:00
"summary": "Deleted the 'y' variable"
2016-11-02 17:50:05 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"short-var-declarations.go"
2016-11-02 17:50:05 +03:00
],
2016-11-11 00:19:53 +03:00
"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"
],
2016-11-02 17:50:05 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "6943eb4765b07143acf4bead143f4e9927d67e74..b47f159a4e69c481019748b1b4451ca5480b48ac"
2016-11-02 17:50:05 +03:00
}]