mirror of
https://github.com/github/semantic.git
synced 2024-12-23 14:54:16 +03:00
743 lines
25 KiB
JSON
743 lines
25 KiB
JSON
[{
|
|
"testCaseDescription": "go-single-import-declarations-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"single-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
18
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"net/http\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"some/dsl\" import statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"single-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
28
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'import alias \"some/package\"' at line 3, column 1 - line 3, column 28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"single-import-declarations.go"
|
|
],
|
|
"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\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "b755f1d4404210b76f3d304569455d98b90fa186..437e7db7a8729ba8a685986dd98343129eaf289b"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-single-import-declarations-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"single-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"foo/bar\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"types/dsl\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
18
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"net/http\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"some/dsl\" import statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"single-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'import alias \"awesome/packages\"' at line 3, column 1 - line 3, column 32"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
28
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'import alias \"some/package\"' at line 6, column 1 - line 6, column 28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"single-import-declarations.go"
|
|
],
|
|
"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\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "437e7db7a8729ba8a685986dd98343129eaf289b..24c2801f35fbac08fe710af7d34a6de746be8b8d"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-single-import-declarations-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"single-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
18
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"foo/bar\" string with the \"net/http\" string in the \"net/http\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
10
|
|
],
|
|
"end": [
|
|
2,
|
|
21
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
10
|
|
],
|
|
"end": [
|
|
2,
|
|
20
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"types/dsl\" string with the \"some/dsl\" string in the \"some/dsl\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
14
|
|
],
|
|
"end": [
|
|
3,
|
|
32
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
14
|
|
],
|
|
"end": [
|
|
3,
|
|
28
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"awesome/packages\" string with the \"some/package\" string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"single-import-declarations.go"
|
|
],
|
|
"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\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "24c2801f35fbac08fe710af7d34a6de746be8b8d..330336208dc9988acdd03b84111ed42f47a68cc1"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-single-import-declarations-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"single-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
18
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
1,
|
|
8
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"net/http\" string with the \"foo/bar\" string in the \"foo/bar\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
10
|
|
],
|
|
"end": [
|
|
2,
|
|
20
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
10
|
|
],
|
|
"end": [
|
|
2,
|
|
21
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"some/dsl\" string with the \"types/dsl\" string in the \"types/dsl\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
14
|
|
],
|
|
"end": [
|
|
3,
|
|
28
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
14
|
|
],
|
|
"end": [
|
|
3,
|
|
32
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"some/package\" string with the \"awesome/packages\" string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"single-import-declarations.go"
|
|
],
|
|
"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\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "330336208dc9988acdd03b84111ed42f47a68cc1..fed29600ad272abe4d05fb7b4bb406a408ef62d9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-single-import-declarations-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"single-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"foo/bar\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"types/dsl\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
18
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"net/http\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"some/dsl\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
4,
|
|
1
|
|
],
|
|
"end": [
|
|
4,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"foo/bar\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
5,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"types/dsl\" import statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"single-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'import alias \"awesome/packages\"' at line 3, column 1 - line 3, column 32"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
28
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'import alias \"some/package\"' at line 6, column 1 - line 6, column 28"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
6,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'import alias \"awesome/packages\"' at line 6, column 1 - line 6, column 32"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"single-import-declarations.go"
|
|
],
|
|
"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\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "fed29600ad272abe4d05fb7b4bb406a408ef62d9..d8fe5f813263407b360696c773393622f8626ac8"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-single-import-declarations-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"single-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
18
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"net/http\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
20
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"some/dsl\" import statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"single-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
28
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'import alias \"some/package\"' at line 3, column 1 - line 3, column 28"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"single-import-declarations.go"
|
|
],
|
|
"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\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "d8fe5f813263407b360696c773393622f8626ac8..a322dc7bac3a14fa7b2bc7584e05add891842d38"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-single-import-declarations-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"single-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
1,
|
|
17
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"foo/bar\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
21
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"types/dsl\" import statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"single-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
3,
|
|
1
|
|
],
|
|
"end": [
|
|
3,
|
|
32
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'import alias \"awesome/packages\"' at line 3, column 1 - line 3, column 32"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"single-import-declarations.go"
|
|
],
|
|
"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\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "a322dc7bac3a14fa7b2bc7584e05add891842d38..49405e780f45c25871a6c2c6a9c4bf847007c59f"
|
|
}]
|