1
1
mirror of https://github.com/github/semantic.git synced 2024-12-24 23:42:31 +03:00
semantic/test/corpus/diff-summaries/go/grouped-import-declarations.json
2016-11-21 14:39:16 -05:00

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": "d3776a45d900cbd376821d2e1c160584387c3eff..d74c769ee38782a518b5fc6d331f1077336bd2e5"
}
,{
"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": "d74c769ee38782a518b5fc6d331f1077336bd2e5..26a27d815a7a5dd75d3cc0b47af5b08fc0557927"
}
,{
"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": "26a27d815a7a5dd75d3cc0b47af5b08fc0557927..a203f6fc895bc2d2147d3b4da8d00094d7d8717a"
}
,{
"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": "a203f6fc895bc2d2147d3b4da8d00094d7d8717a..168123f44d44616f89ef3534cc8719ee55298cc2"
}
,{
"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": "168123f44d44616f89ef3534cc8719ee55298cc2..9e9b0e3dd857a76fe3324068b8e4d3ba2ed60cf1"
}
,{
"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": "9e9b0e3dd857a76fe3324068b8e4d3ba2ed60cf1..abb096a83c3d2c796d0b3bca527d1a88a0abcf0f"
}
,{
"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": "abb096a83c3d2c796d0b3bca527d1a88a0abcf0f..b2e7d5c55b0451b6df811cbee862a417309a1a27"
}]