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

743 lines
25 KiB
JSON
Raw Normal View History

2016-11-02 04:36:43 +03:00
[{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-single-import-declarations-insert-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-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": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
18
]
}
},
"summary": "Added the \"net/http\" import statement"
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
20
]
}
},
"summary": "Added the \"some/dsl\" import statement"
}
]
},
"errors": {
2016-11-02 21:37:30 +03:00
"single-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
28
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Added the 'import alias \"some/package\"' at line 3, column 1 - line 3, column 28"
2016-11-02 04:36:43 +03:00
}
]
}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index e69de29..e30eddb 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -0,0 +1,3 @@",
"+import \"net/http\"",
"+import . \"some/dsl\"",
"+import alias \"some/package\""
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "793a496d623444e8be55cfd3e3c1f3e7a1099406..8535b3bd21f463f65d277f11d98abfded0c74ec1"
2016-11-02 04:36:43 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-single-import-declarations-replacement-insert-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-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": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
17
]
}
},
"summary": "Added the \"foo/bar\" import statement"
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
21
]
}
},
"summary": "Added the \"types/dsl\" import statement"
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 04:36:43 +03:00
18
]
}
},
"summary": "Added the \"net/http\" import statement"
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 04:36:43 +03:00
20
]
}
},
"summary": "Added the \"some/dsl\" import statement"
}
]
},
"errors": {
2016-11-02 21:37:30 +03:00
"single-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
32
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Added the 'import alias \"awesome/packages\"' at line 3, column 1 - line 3, column 32"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 04:36:43 +03:00
28
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Added the 'import alias \"some/package\"' at line 6, column 1 - line 6, column 28"
2016-11-02 04:36:43 +03:00
}
]
}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index e30eddb..a6141af 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -1,3 +1,9 @@",
"+import \"foo/bar\"",
"+import . \"types/dsl\"",
"+import alias \"awesome/packages\"",
"+import \"net/http\"",
"+import . \"some/dsl\"",
"+import alias \"some/package\"",
" import \"net/http\"",
" import . \"some/dsl\"",
" import alias \"some/package\""
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "8535b3bd21f463f65d277f11d98abfded0c74ec1..70e7e9c49e34fc8cd3b0b419c84cc73864f2c6e7"
2016-11-02 04:36:43 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-single-import-declarations-delete-insert-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
8
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
17
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
8
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
18
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the \"foo/bar\" string with the \"net/http\" string in the \"net/http\" import statement"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
10
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
21
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
10
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
20
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the \"types/dsl\" string with the \"some/dsl\" string in the \"some/dsl\" import statement"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
14
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
32
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
14
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
28
]
}
]
},
"summary": "Replaced the \"awesome/packages\" string with the \"some/package\" string"
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index a6141af..b54ad96 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -1,6 +1,6 @@",
"-import \"foo/bar\"",
"-import . \"types/dsl\"",
"-import alias \"awesome/packages\"",
"+import \"net/http\"",
"+import . \"some/dsl\"",
"+import alias \"some/package\"",
" import \"net/http\"",
" import . \"some/dsl\"",
" import alias \"some/package\""
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "70e7e9c49e34fc8cd3b0b419c84cc73864f2c6e7..a0af3129ebe2ee05ee2d8e68a0c095a8ea992b2f"
2016-11-02 04:36:43 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-single-import-declarations-replacement-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
8
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
18
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
8
],
"end": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
17
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the \"net/http\" string with the \"foo/bar\" string in the \"foo/bar\" import statement"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
10
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
20
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
10
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
21
]
}
]
},
2016-11-11 00:19:53 +03:00
"summary": "Replaced the \"some/dsl\" string with the \"types/dsl\" string in the \"types/dsl\" import statement"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"replace": [
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
14
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
28
]
},
{
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
14
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
32
]
}
]
},
"summary": "Replaced the \"some/package\" string with the \"awesome/packages\" string"
}
]
},
"errors": {}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index b54ad96..a6141af 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -1,6 +1,6 @@",
"-import \"net/http\"",
"-import . \"some/dsl\"",
"-import alias \"some/package\"",
"+import \"foo/bar\"",
"+import . \"types/dsl\"",
"+import alias \"awesome/packages\"",
" import \"net/http\"",
" import . \"some/dsl\"",
" import alias \"some/package\""
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "a0af3129ebe2ee05ee2d8e68a0c095a8ea992b2f..feb2a0ac79da8b6797559f7afad60f25c83c16eb"
2016-11-02 04:36:43 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-single-import-declarations-delete-replacement-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-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": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
17
]
}
},
"summary": "Deleted the \"foo/bar\" import statement"
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
21
]
}
},
"summary": "Deleted the \"types/dsl\" import statement"
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 04:36:43 +03:00
18
]
}
},
"summary": "Deleted the \"net/http\" import statement"
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 04:36:43 +03:00
20
]
}
},
"summary": "Deleted the \"some/dsl\" import statement"
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
4,
2016-11-02 04:36:43 +03:00
17
]
}
},
"summary": "Added the \"foo/bar\" import statement"
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
5,
2016-11-02 04:36:43 +03:00
21
]
}
},
"summary": "Added the \"types/dsl\" import statement"
}
]
},
"errors": {
2016-11-02 21:37:30 +03:00
"single-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
32
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Deleted the 'import alias \"awesome/packages\"' at line 3, column 1 - line 3, column 32"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 04:36:43 +03:00
28
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Deleted the 'import alias \"some/package\"' at line 6, column 1 - line 6, column 28"
2016-11-02 04:36:43 +03:00
},
{
"span": {
"insert": {
"start": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
6,
2016-11-02 04:36:43 +03:00
32
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Added the 'import alias \"awesome/packages\"' at line 6, column 1 - line 6, column 32"
2016-11-02 04:36:43 +03:00
}
]
}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index a6141af..98c2392 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -1,9 +1,6 @@",
"-import \"foo/bar\"",
"-import . \"types/dsl\"",
"-import alias \"awesome/packages\"",
"-import \"net/http\"",
"-import . \"some/dsl\"",
"-import alias \"some/package\"",
" import \"net/http\"",
" import . \"some/dsl\"",
" import alias \"some/package\"",
"+import \"foo/bar\"",
"+import . \"types/dsl\"",
"+import alias \"awesome/packages\""
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "feb2a0ac79da8b6797559f7afad60f25c83c16eb..092a25430fea92313b4bf0929aa790de8dd9f972"
2016-11-02 04:36:43 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-single-import-declarations-delete-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-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": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
18
]
}
},
"summary": "Deleted the \"net/http\" import statement"
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
20
]
}
},
"summary": "Deleted the \"some/dsl\" import statement"
}
]
},
"errors": {
2016-11-02 21:37:30 +03:00
"single-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
28
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Deleted the 'import alias \"some/package\"' at line 3, column 1 - line 3, column 28"
2016-11-02 04:36:43 +03:00
}
]
}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index 98c2392..8af8c6d 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -1,6 +1,3 @@",
"-import \"net/http\"",
"-import . \"some/dsl\"",
"-import alias \"some/package\"",
" import \"foo/bar\"",
" import . \"types/dsl\"",
" import alias \"awesome/packages\""
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "092a25430fea92313b4bf0929aa790de8dd9f972..0d86b3da56f7c4362eab27035b89c90980c720f4"
2016-11-02 04:36:43 +03:00
}
,{
2016-11-02 21:37:30 +03:00
"testCaseDescription": "go-single-import-declarations-delete-rest-test",
2016-11-02 04:36:43 +03:00
"expectedResult": {
"changes": {
2016-11-02 21:37:30 +03:00
"single-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": [
2016-11-11 00:19:53 +03:00
1,
2016-11-02 04:36:43 +03:00
17
]
}
},
"summary": "Deleted the \"foo/bar\" import statement"
},
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
2,
2016-11-02 04:36:43 +03:00
21
]
}
},
"summary": "Deleted the \"types/dsl\" import statement"
}
]
},
"errors": {
2016-11-02 21:37:30 +03:00
"single-import-declarations.go": [
2016-11-02 04:36:43 +03:00
{
"span": {
"delete": {
"start": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
1
],
"end": [
2016-11-11 00:19:53 +03:00
3,
2016-11-02 04:36:43 +03:00
32
]
}
},
2016-11-11 00:19:53 +03:00
"summary": "Deleted the 'import alias \"awesome/packages\"' at line 3, column 1 - line 3, column 32"
2016-11-02 04:36:43 +03:00
}
]
}
},
"filePaths": [
2016-11-02 21:37:30 +03:00
"single-import-declarations.go"
2016-11-02 04:36:43 +03:00
],
2016-11-11 00:19:53 +03:00
"patch": [
"diff --git a/single-import-declarations.go b/single-import-declarations.go",
"index 8af8c6d..e69de29 100644",
"--- a/single-import-declarations.go",
"+++ b/single-import-declarations.go",
"@@ -1,3 +0,0 @@",
"-import \"foo/bar\"",
"-import . \"types/dsl\"",
"-import alias \"awesome/packages\""
],
2016-11-02 04:36:43 +03:00
"gitDir": "test/corpus/repos/go",
"shas": "0d86b3da56f7c4362eab27035b89c90980c720f4..3a1a004fc80ca40433336cc35ed31bd631b4d589"
2016-11-02 04:36:43 +03:00
}]