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": "e756016d00cbb2ae9607ed672bb321d7c6d15d50..2c7d7717c5c20aef371382b685458c795ff1abd2"
|
|
}
|
|
,{
|
|
"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": "2c7d7717c5c20aef371382b685458c795ff1abd2..4a39626a12de7ec38583ef5c658f64a76cae3566"
|
|
}
|
|
,{
|
|
"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": "4a39626a12de7ec38583ef5c658f64a76cae3566..ca8d54fdd61b845e69cb87f9e03db6166f0ad6e2"
|
|
}
|
|
,{
|
|
"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": "ca8d54fdd61b845e69cb87f9e03db6166f0ad6e2..22b73500376dfdd36e9f943e6b1ac8ac1666aaec"
|
|
}
|
|
,{
|
|
"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": "22b73500376dfdd36e9f943e6b1ac8ac1666aaec..ac3dcbb4dee65c31cda61c7b574a9ea4c01d5746"
|
|
}
|
|
,{
|
|
"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": "ac3dcbb4dee65c31cda61c7b574a9ea4c01d5746..f9faff17307c353636a397c70a7e5028a891d8aa"
|
|
}
|
|
,{
|
|
"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": "f9faff17307c353636a397c70a7e5028a891d8aa..925d3d16e8d2bb1a995298cd95b1fd09dfec3b2e"
|
|
}]
|