mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
503 lines
16 KiB
JSON
503 lines
16 KiB
JSON
[{
|
|
"testCaseDescription": "go-grouped-import-declarations-setup-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index e69de29b..79058077 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+package main",
|
|
"+",
|
|
"+func main() {",
|
|
"+",
|
|
"+}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "90d9c50e1b407ede8b0dabba4aaf6d69e7b22e34..d0db9d48694412bdb0c47f0c9998e31d8cd26375"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'import' identifier in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"net/http\" string in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
3
|
|
],
|
|
"end": [
|
|
7,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added '. \"some/dsl\"\n alias \"some/package\"' at line 6, column 3 - line 7, column 23 in the main function"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index 79058077..b544dded 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -1,5 +1,9 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-",
|
|
"+import (",
|
|
"+\"net/http\"",
|
|
"+ . \"some/dsl\"",
|
|
"+ alias \"some/package\"",
|
|
"+)",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "d0db9d48694412bdb0c47f0c9998e31d8cd26375..749db332b83ec9096cb398770fff8ab0faf46e71"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
11
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"net/http\" string with the \"net/socket\" string in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
16
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"some/dsl\" string with the \"types/dsl\" string in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
9
|
|
],
|
|
"end": [
|
|
7,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
9
|
|
],
|
|
"end": [
|
|
7,
|
|
26
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"some/package\" string with the \"awesome/package\" string in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index b544dded..1fd89e1d 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -2,8 +2,8 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" import (",
|
|
"-\"net/http\"",
|
|
"- . \"some/dsl\"",
|
|
"- alias \"some/package\"",
|
|
"+\"net/socket\"",
|
|
"+ . \"types/dsl\"",
|
|
"+ alias \"awesome/package\"",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "749db332b83ec9096cb398770fff8ab0faf46e71..682c57777f72853987b772348b7913235a2417b3"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
11
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"net/socket\" string with the \"net/http\" string in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
6,
|
|
5
|
|
],
|
|
"end": [
|
|
6,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"types/dsl\" string with the \"some/dsl\" string in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
7,
|
|
9
|
|
],
|
|
"end": [
|
|
7,
|
|
26
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
7,
|
|
9
|
|
],
|
|
"end": [
|
|
7,
|
|
23
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"awesome/package\" string with the \"some/package\" string in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index 1fd89e1d..b544dded 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -2,8 +2,8 @@ package main",
|
|
" ",
|
|
" func main() {",
|
|
" import (",
|
|
"-\"net/socket\"",
|
|
"- . \"types/dsl\"",
|
|
"- alias \"awesome/package\"",
|
|
"+\"net/http\"",
|
|
"+ . \"some/dsl\"",
|
|
"+ alias \"some/package\"",
|
|
" )",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "682c57777f72853987b772348b7913235a2417b3..a9a399534d4570cdabdfe9aa2af24a355d8319e8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
7
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'import' identifier in the main function"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
11
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"net/http\" string in the main function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
3
|
|
],
|
|
"end": [
|
|
7,
|
|
23
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted '. \"some/dsl\"\n alias \"some/package\"' at line 6, column 3 - line 7, column 23 in the main function"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index b544dded..79058077 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -1,9 +1,5 @@",
|
|
" package main",
|
|
" ",
|
|
" func main() {",
|
|
"-import (",
|
|
"-\"net/http\"",
|
|
"- . \"some/dsl\"",
|
|
"- alias \"some/package\"",
|
|
"-)",
|
|
"+",
|
|
" }"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a9a399534d4570cdabdfe9aa2af24a355d8319e8..c7a434072e61668c518c6bc882a6f2020b77f974"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-teardown-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
13
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' module"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'main' function"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index 79058077..e69de29b 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-package main",
|
|
"-",
|
|
"-func main() {",
|
|
"-",
|
|
"-}"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "c7a434072e61668c518c6bc882a6f2020b77f974..b34a29214dd3a4e004c26f6acbc313aacaee0833"
|
|
}]
|