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/grouped-import-declarations.json

503 lines
16 KiB
JSON
Raw Normal View History

2016-11-02 04:36:43 +03:00
[{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-grouped-import-declarations-setup-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"grouped-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
1
],
"end": [
1,
13
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Added the 'main' module"
},
{
"span": {
"insert": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Added the 'main' function"
2016-11-02 04:36:43 +03:00
}
]
},
2016-12-02 00:03:52 +03:00
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"grouped-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
2017-01-17 23:26:07 +03:00
"index e69de29b..79058077 100644",
2016-11-11 00:19:53 +03:00
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
"@@ -0,0 +1,5 @@",
2016-12-02 00:03:52 +03:00
"+package main",
"+",
"+func main() {",
"+",
"+}"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "c9c6b465b09d2cc43a49283892189100eedda2d9..7e58014b8b5e21bfed1c7a79b939733bada5c393"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-grouped-import-declarations-insert-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"grouped-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 04:36:43 +03:00
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
2016-11-02 04:36:43 +03:00
]
}
},
"summary": "Added '. \"some/dsl\"\n alias \"some/package\"' at line 6, column 3 - line 7, column 23 in the main function"
2016-11-02 04:36:43 +03:00
}
]
}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"grouped-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
2017-01-17 23:26:07 +03:00
"index 79058077..b544dded 100644",
2016-11-11 00:19:53 +03:00
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,5 +1,9 @@",
" package main",
" ",
" func main() {",
"-",
2016-11-11 00:19:53 +03:00
"+import (",
"+\"net/http\"",
"+ . \"some/dsl\"",
"+ alias \"some/package\"",
"+)",
2016-12-02 00:03:52 +03:00
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "7e58014b8b5e21bfed1c7a79b939733bada5c393..e25273f0232e908a85785634399cd4306d4b0f50"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-grouped-import-declarations-replacement-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"grouped-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
1
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
11
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
1
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
13
2016-11-02 04:36:43 +03:00
]
}
]
},
"summary": "Replaced the \"net/http\" string with the \"net/socket\" string in the main function"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 21:37:30 +03:00
5
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
6,
15
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 21:37:30 +03:00
5
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
6,
16
2016-11-02 04:36:43 +03:00
]
}
]
},
"summary": "Replaced the \"some/dsl\" string with the \"types/dsl\" string in the main function"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
7,
2016-11-02 21:37:30 +03:00
9
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
7,
23
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
7,
2016-11-02 21:37:30 +03:00
9
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
7,
26
2016-11-02 04:36:43 +03:00
]
}
]
},
"summary": "Replaced the \"some/package\" string with the \"awesome/package\" string in the main function"
2016-11-02 04:36:43 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"grouped-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
2017-01-17 23:26:07 +03:00
"index b544dded..1fd89e1d 100644",
2016-11-11 00:19:53 +03:00
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -2,8 +2,8 @@ package main",
" ",
" func main() {",
2016-11-11 00:19:53 +03:00
" import (",
2016-12-02 00:03:52 +03:00
"-\"net/http\"",
"- . \"some/dsl\"",
"- alias \"some/package\"",
"+\"net/socket\"",
"+ . \"types/dsl\"",
"+ alias \"awesome/package\"",
2016-11-11 00:19:53 +03:00
" )",
2016-12-02 00:03:52 +03:00
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "e25273f0232e908a85785634399cd4306d4b0f50..315f306dad6016d0e9eab97d0281d4cf57f195a0"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-grouped-import-declarations-delete-replacement-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"grouped-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
1
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
13
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
5,
2016-11-02 21:37:30 +03:00
1
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
5,
11
2016-11-02 04:36:43 +03:00
]
}
]
},
"summary": "Replaced the \"net/socket\" string with the \"net/http\" string in the main function"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 21:37:30 +03:00
5
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
6,
16
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
6,
2016-11-02 21:37:30 +03:00
5
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
6,
15
2016-11-02 04:36:43 +03:00
]
}
]
},
"summary": "Replaced the \"types/dsl\" string with the \"some/dsl\" string in the main function"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-12-02 00:03:52 +03:00
7,
2016-11-02 21:37:30 +03:00
9
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
7,
26
2016-11-02 04:36:43 +03:00
]
},
{
"start": [
2016-12-02 00:03:52 +03:00
7,
2016-11-02 21:37:30 +03:00
9
2016-11-02 04:36:43 +03:00
],
"end": [
2016-12-02 00:03:52 +03:00
7,
23
2016-11-02 04:36:43 +03:00
]
}
]
},
"summary": "Replaced the \"awesome/package\" string with the \"some/package\" string in the main function"
2016-11-02 04:36:43 +03:00
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"grouped-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
2017-01-17 23:26:07 +03:00
"index 1fd89e1d..b544dded 100644",
2016-11-11 00:19:53 +03:00
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -2,8 +2,8 @@ package main",
" ",
" func main() {",
2016-11-11 00:19:53 +03:00
" import (",
"-\"net/socket\"",
"- . \"types/dsl\"",
"- alias \"awesome/package\"",
2016-12-02 00:03:52 +03:00
"+\"net/http\"",
"+ . \"some/dsl\"",
"+ alias \"some/package\"",
2016-11-11 00:19:53 +03:00
" )",
2016-12-02 00:03:52 +03:00
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "315f306dad6016d0e9eab97d0281d4cf57f195a0..70baaa3b576006426b0fc314fd20dabd11faa198"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-grouped-import-declarations-delete-insert-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"grouped-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
2016-12-02 00:03:52 +03:00
4,
2016-11-02 04:36:43 +03:00
1
],
"end": [
4,
7
2016-11-02 04:36:43 +03:00
]
}
},
"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"
2016-11-02 04:36:43 +03:00
}
]
}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"grouped-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
2017-01-17 23:26:07 +03:00
"index b544dded..79058077 100644",
2016-11-11 00:19:53 +03:00
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
2016-12-02 00:03:52 +03:00
"@@ -1,9 +1,5 @@",
" package main",
" ",
" func main() {",
"-import (",
2016-11-11 00:19:53 +03:00
"-\"net/http\"",
"- . \"some/dsl\"",
"- alias \"some/package\"",
"-)",
2016-12-02 00:03:52 +03:00
"+",
" }"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "70baaa3b576006426b0fc314fd20dabd11faa198..84aededfbb39e93a87cde0823ce49a3b204c0ebb"
2016-11-02 04:36:43 +03:00
}
,{
2016-12-02 00:03:52 +03:00
"testCaseDescription": "go-grouped-import-declarations-teardown-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"grouped-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
1
],
"end": [
1,
13
2016-11-02 04:36:43 +03:00
]
}
},
2016-12-02 00:03:52 +03:00
"summary": "Deleted the 'main' module"
},
{
"span": {
"delete": {
"start": [
3,
1
],
"end": [
5,
2
]
}
},
"summary": "Deleted the 'main' function"
2016-11-02 04:36:43 +03:00
}
]
},
2016-12-02 00:03:52 +03:00
"errors": {}
2016-11-02 04:36:43 +03:00
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"grouped-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
2017-01-17 23:26:07 +03:00
"index 79058077..e69de29b 100644",
2016-11-11 00:19:53 +03:00
"--- a/grouped-import-declarations.go",
"+++ b/grouped-import-declarations.go",
"@@ -1,5 +0,0 @@",
2016-12-02 00:03:52 +03:00
"-package main",
"-",
"-func main() {",
"-",
"-}"
2016-11-11 00:19:53 +03:00
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "84aededfbb39e93a87cde0823ce49a3b204c0ebb..24668b2cd22551f9c0e9c05a4dcd2d9b891498b9"
2016-11-02 04:36:43 +03:00
}]