mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
713 lines
23 KiB
JSON
713 lines
23 KiB
JSON
[{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'zero' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'one' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'two' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index e69de29..f156385 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -0,0 +1,2 @@",
|
|
"+var zero int",
|
|
"+var one, two uint64"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "7eca4d811d912df0bd9d2b432cc34641fcb7519c..400799349efd25fb79f48b7bbc36023e050cc2d2"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'c' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'zero' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'one' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'two' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index f156385..f696db9 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -1,2 +1,6 @@",
|
|
"+var a int",
|
|
"+var b, c uint64",
|
|
"+var zero int",
|
|
"+var one, two uint64",
|
|
" var zero int",
|
|
" var one, two uint64"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "400799349efd25fb79f48b7bbc36023e050cc2d2..adfeb81fabd9bd315f86791bcd94344de6e24120"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'a' identifier with the 'zero' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'b' identifier with the 'one' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
8
|
|
],
|
|
"end": [
|
|
2,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
10
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'c' identifier with the 'two' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index f696db9..e5e3183 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -1,5 +1,5 @@",
|
|
"-var a int",
|
|
"-var b, c uint64",
|
|
"+var zero int",
|
|
"+var one, two uint64",
|
|
" var zero int",
|
|
" var one, two uint64",
|
|
" var zero int"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "adfeb81fabd9bd315f86791bcd94344de6e24120..2b41985dc78bc94d65a90dd0b9b7bc0ddc02a48b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
9
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
5
|
|
],
|
|
"end": [
|
|
1,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'zero' identifier with the 'a' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
8
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
5
|
|
],
|
|
"end": [
|
|
2,
|
|
6
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'one' identifier with the 'b' identifier"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
10
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
8
|
|
],
|
|
"end": [
|
|
2,
|
|
9
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the 'two' identifier with the 'c' identifier"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index e5e3183..f696db9 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -1,5 +1,5 @@",
|
|
"-var zero int",
|
|
"-var one, two uint64",
|
|
"+var a int",
|
|
"+var b, c uint64",
|
|
" var zero int",
|
|
" var one, two uint64",
|
|
" var zero int"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "2b41985dc78bc94d65a90dd0b9b7bc0ddc02a48b..ae5681370714028c4e197f18c18c5275321d185f"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'c' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'zero' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'one' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'two' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'c' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index f696db9..137ee10 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -1,6 +1,4 @@",
|
|
"-var a int",
|
|
"-var b, c uint64",
|
|
"-var zero int",
|
|
"-var one, two uint64",
|
|
" var zero int",
|
|
" var one, two uint64",
|
|
"+var a int",
|
|
"+var b, c uint64"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "ae5681370714028c4e197f18c18c5275321d185f..d3e9775243f82f41130f72bd20dc7b806ba200a9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'zero' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'one' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'two' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index 137ee10..443ec9e 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -1,4 +1,2 @@",
|
|
"-var zero int",
|
|
"-var one, two uint64",
|
|
" var a int",
|
|
" var b, c uint64"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "d3e9775243f82f41130f72bd20dc7b806ba200a9..6e94a11d64083910c800363edb88a9ee0680c37c"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-var-declarations-with-no-expressions-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"var-declarations-with-no-expressions.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
10
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'a' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'b' variable"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
16
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'c' variable"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"var-declarations-with-no-expressions.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/var-declarations-with-no-expressions.go b/var-declarations-with-no-expressions.go",
|
|
"index 443ec9e..e69de29 100644",
|
|
"--- a/var-declarations-with-no-expressions.go",
|
|
"+++ b/var-declarations-with-no-expressions.go",
|
|
"@@ -1,2 +0,0 @@",
|
|
"-var a int",
|
|
"-var b, c uint64"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "6e94a11d64083910c800363edb88a9ee0680c37c..96f8228635d5aa31ec4bb2a39ffe29e5d20a9025"
|
|
}]
|