mirror of
https://github.com/github/semantic.git
synced 2024-12-24 15:35:14 +03:00
763 lines
25 KiB
JSON
763 lines
25 KiB
JSON
[{
|
|
"testCaseDescription": "go-grouped-import-declarations-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"net/http\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"some/dsl\" import statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 1, column 1 - line 5, column 2"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index e69de29..6560136 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -0,0 +1,5 @@",
|
|
"+import (",
|
|
"+\"net/http\"",
|
|
"+ . \"some/dsl\"",
|
|
"+ alias \"some/package\"",
|
|
"+)"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "7c97e646150904f4cc118792db5928ab7d8cce38..826093ba7e02152b00e436b3ffdda86b62199195"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-replacement-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"net/socket\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"types/dsl\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"net/http\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"some/dsl\" import statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)' at line 1, column 1 - line 5, column 2"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 6, column 1 - line 10, column 2"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index 6560136..31d6bd7 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -1,4 +1,14 @@",
|
|
" import (",
|
|
"+\"net/socket\"",
|
|
"+ . \"types/dsl\"",
|
|
"+ alias \"awesome/package\"",
|
|
"+)",
|
|
"+import (",
|
|
"+\"net/http\"",
|
|
"+ . \"some/dsl\"",
|
|
"+ alias \"some/package\"",
|
|
"+)",
|
|
"+import (",
|
|
" \"net/http\"",
|
|
" . \"some/dsl\"",
|
|
" alias \"some/package\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "826093ba7e02152b00e436b3ffdda86b62199195..1f207f37100ee6996a58cdf38a7914e96aec17b0"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-delete-insert-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
11
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"net/socket\" string with the \"net/http\" string in the \"net/http\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
5
|
|
],
|
|
"end": [
|
|
3,
|
|
16
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
5
|
|
],
|
|
"end": [
|
|
3,
|
|
15
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"types/dsl\" string with the \"some/dsl\" string in the \"some/dsl\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
9
|
|
],
|
|
"end": [
|
|
4,
|
|
26
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
9
|
|
],
|
|
"end": [
|
|
4,
|
|
23
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"awesome/package\" string with the \"some/package\" string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index 31d6bd7..b045ab3 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -1,7 +1,7 @@",
|
|
" import (",
|
|
"-\"net/socket\"",
|
|
"- . \"types/dsl\"",
|
|
"- alias \"awesome/package\"",
|
|
"+\"net/http\"",
|
|
"+ . \"some/dsl\"",
|
|
"+ alias \"some/package\"",
|
|
" )",
|
|
" import (",
|
|
" \"net/http\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "1f207f37100ee6996a58cdf38a7914e96aec17b0..cab0f9750b43472d0781cba293fb8a798d7c9f5e"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
11
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
2,
|
|
1
|
|
],
|
|
"end": [
|
|
2,
|
|
13
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"net/http\" string with the \"net/socket\" string in the \"net/socket\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
3,
|
|
5
|
|
],
|
|
"end": [
|
|
3,
|
|
15
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
3,
|
|
5
|
|
],
|
|
"end": [
|
|
3,
|
|
16
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"some/dsl\" string with the \"types/dsl\" string in the \"types/dsl\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"replace": [
|
|
{
|
|
"start": [
|
|
4,
|
|
9
|
|
],
|
|
"end": [
|
|
4,
|
|
23
|
|
]
|
|
},
|
|
{
|
|
"start": [
|
|
4,
|
|
9
|
|
],
|
|
"end": [
|
|
4,
|
|
26
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"summary": "Replaced the \"some/package\" string with the \"awesome/package\" string"
|
|
}
|
|
]
|
|
},
|
|
"errors": {}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index b045ab3..31d6bd7 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -1,7 +1,7 @@",
|
|
" import (",
|
|
"-\"net/http\"",
|
|
"- . \"some/dsl\"",
|
|
"- alias \"some/package\"",
|
|
"+\"net/socket\"",
|
|
"+ . \"types/dsl\"",
|
|
"+ alias \"awesome/package\"",
|
|
" )",
|
|
" import (",
|
|
" \"net/http\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "cab0f9750b43472d0781cba293fb8a798d7c9f5e..0996ead4bffeb92e03495be9d14b6697c043f845"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-delete-replacement-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"net/socket\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"types/dsl\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"net/http\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"some/dsl\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"net/socket\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the \"types/dsl\" import statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)' at line 1, column 1 - line 5, column 2"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 6, column 1 - line 10, column 2"
|
|
},
|
|
{
|
|
"span": {
|
|
"insert": {
|
|
"start": [
|
|
6,
|
|
1
|
|
],
|
|
"end": [
|
|
10,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Added the 'import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)' at line 6, column 1 - line 10, column 2"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index 31d6bd7..62facc6 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -1,15 +1,10 @@",
|
|
" import (",
|
|
"-\"net/socket\"",
|
|
"- . \"types/dsl\"",
|
|
"- alias \"awesome/package\"",
|
|
"-)",
|
|
"-import (",
|
|
" \"net/http\"",
|
|
" . \"some/dsl\"",
|
|
" alias \"some/package\"",
|
|
" )",
|
|
" import (",
|
|
"-\"net/http\"",
|
|
"- . \"some/dsl\"",
|
|
"- alias \"some/package\"",
|
|
"+\"net/socket\"",
|
|
"+ . \"types/dsl\"",
|
|
"+ alias \"awesome/package\"",
|
|
" )"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "0996ead4bffeb92e03495be9d14b6697c043f845..c36feea8f1dbc0cdf866346e85c2ec78c4cd6083"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-delete-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"net/http\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"some/dsl\" import statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'import (\n\"net/http\"\n . \"some/dsl\"\n alias \"some/package\"\n)' at line 1, column 1 - line 5, column 2"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index 62facc6..e2f9293 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -1,9 +1,4 @@",
|
|
" import (",
|
|
"-\"net/http\"",
|
|
"- . \"some/dsl\"",
|
|
"- alias \"some/package\"",
|
|
"-)",
|
|
"-import (",
|
|
" \"net/socket\"",
|
|
" . \"types/dsl\"",
|
|
" alias \"awesome/package\""
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "c36feea8f1dbc0cdf866346e85c2ec78c4cd6083..8f809e4e22bfa379dc9c88177c3d7a7e64f042d9"
|
|
}
|
|
,{
|
|
"testCaseDescription": "go-grouped-import-declarations-delete-rest-test",
|
|
"expectedResult": {
|
|
"changes": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"net/socket\" import statement"
|
|
},
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the \"types/dsl\" import statement"
|
|
}
|
|
]
|
|
},
|
|
"errors": {
|
|
"grouped-import-declarations.go": [
|
|
{
|
|
"span": {
|
|
"delete": {
|
|
"start": [
|
|
1,
|
|
1
|
|
],
|
|
"end": [
|
|
5,
|
|
2
|
|
]
|
|
}
|
|
},
|
|
"summary": "Deleted the 'import (\n\"net/socket\"\n . \"types/dsl\"\n alias \"awesome/package\"\n)' at line 1, column 1 - line 5, column 2"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"filePaths": [
|
|
"grouped-import-declarations.go"
|
|
],
|
|
"patch": [
|
|
"diff --git a/grouped-import-declarations.go b/grouped-import-declarations.go",
|
|
"index e2f9293..e69de29 100644",
|
|
"--- a/grouped-import-declarations.go",
|
|
"+++ b/grouped-import-declarations.go",
|
|
"@@ -1,5 +0,0 @@",
|
|
"-import (",
|
|
"-\"net/socket\"",
|
|
"- . \"types/dsl\"",
|
|
"- alias \"awesome/package\"",
|
|
"-)"
|
|
],
|
|
"gitDir": "test/corpus/repos/go",
|
|
"shas": "8f809e4e22bfa379dc9c88177c3d7a7e64f042d9..424844dbc2297652ccb81023c78ee64bd948b232"
|
|
}]
|