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": "793a496d623444e8be55cfd3e3c1f3e7a1099406..8535b3bd21f463f65d277f11d98abfded0c74ec1"
|
|
}
|
|
,{
|
|
"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": "8535b3bd21f463f65d277f11d98abfded0c74ec1..70e7e9c49e34fc8cd3b0b419c84cc73864f2c6e7"
|
|
}
|
|
,{
|
|
"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": "70e7e9c49e34fc8cd3b0b419c84cc73864f2c6e7..a0af3129ebe2ee05ee2d8e68a0c095a8ea992b2f"
|
|
}
|
|
,{
|
|
"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": "a0af3129ebe2ee05ee2d8e68a0c095a8ea992b2f..feb2a0ac79da8b6797559f7afad60f25c83c16eb"
|
|
}
|
|
,{
|
|
"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": "feb2a0ac79da8b6797559f7afad60f25c83c16eb..092a25430fea92313b4bf0929aa790de8dd9f972"
|
|
}
|
|
,{
|
|
"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": "092a25430fea92313b4bf0929aa790de8dd9f972..0d86b3da56f7c4362eab27035b89c90980c720f4"
|
|
}
|
|
,{
|
|
"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": "0d86b3da56f7c4362eab27035b89c90980c720f4..3a1a004fc80ca40433336cc35ed31bd631b4d589"
|
|
}]
|