mirror of
https://github.com/github/semantic.git
synced 2024-11-28 10:15:55 +03:00
stub function-literal
This commit is contained in:
parent
05f3929b6a
commit
0a085edfeb
@ -114,6 +114,8 @@ data Category
|
||||
| Import
|
||||
-- | An export
|
||||
| Export
|
||||
-- | An anonymous function
|
||||
| AnonymousFunction
|
||||
deriving (Eq, Generic, Ord, Show)
|
||||
|
||||
-- Instances
|
||||
|
@ -78,6 +78,7 @@ categoryForGoName = \case
|
||||
"raw_string_literal" -> StringLiteral
|
||||
"binary_expression" -> RelationalOperator
|
||||
"function_declaration" -> Function
|
||||
"func_literal" -> Function
|
||||
"call_expression" -> FunctionCall
|
||||
"selector_expression" -> MethodCall
|
||||
"parameters" -> Args
|
||||
|
@ -25,9 +25,9 @@
|
||||
"filePaths": [
|
||||
"assignment.go"
|
||||
],
|
||||
"sha1": "03e2ae649be00191f3a4617a67c0c0ba3ad8b380",
|
||||
"sha1": "ad85f1036e6ad3d8aba500916c2be5363e35718d",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "b885b4b6606dd7693a37100ca299e797a0ebb236"
|
||||
"sha2": "4daf11f9b442da16d2e91558fac8daceea907c08"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-assignment-replacement-insert-test",
|
||||
@ -71,9 +71,9 @@
|
||||
"filePaths": [
|
||||
"assignment.go"
|
||||
],
|
||||
"sha1": "b885b4b6606dd7693a37100ca299e797a0ebb236",
|
||||
"sha1": "4daf11f9b442da16d2e91558fac8daceea907c08",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "bbed25bf54ca39c0fe70485ddad022f88c4ae6b2"
|
||||
"sha2": "c96fba5c543d754c53b821b53617e4c1383ab587"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-assignment-delete-insert-test",
|
||||
@ -144,9 +144,9 @@
|
||||
"filePaths": [
|
||||
"assignment.go"
|
||||
],
|
||||
"sha1": "bbed25bf54ca39c0fe70485ddad022f88c4ae6b2",
|
||||
"sha1": "c96fba5c543d754c53b821b53617e4c1383ab587",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "44be9b44a47ab8c352f9894aa8c665b1d0693404"
|
||||
"sha2": "da2e634cf5dbf47885f788fcaff23338a877d513"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-assignment-replacement-test",
|
||||
@ -217,9 +217,9 @@
|
||||
"filePaths": [
|
||||
"assignment.go"
|
||||
],
|
||||
"sha1": "44be9b44a47ab8c352f9894aa8c665b1d0693404",
|
||||
"sha1": "da2e634cf5dbf47885f788fcaff23338a877d513",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "88a6494880d4b03546b1c3caa9fce5720c4ddab2"
|
||||
"sha2": "344342e395d5586b301637d4105888d17cf77151"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-assignment-delete-replacement-test",
|
||||
@ -278,9 +278,9 @@
|
||||
"filePaths": [
|
||||
"assignment.go"
|
||||
],
|
||||
"sha1": "88a6494880d4b03546b1c3caa9fce5720c4ddab2",
|
||||
"sha1": "344342e395d5586b301637d4105888d17cf77151",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "b919119ad4a0ba241b7f6cb0689b5513f91620a1"
|
||||
"sha2": "758c0e9386b81e6e31c522a3c04a03f74c5761a8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-assignment-delete-test",
|
||||
@ -309,9 +309,9 @@
|
||||
"filePaths": [
|
||||
"assignment.go"
|
||||
],
|
||||
"sha1": "b919119ad4a0ba241b7f6cb0689b5513f91620a1",
|
||||
"sha1": "758c0e9386b81e6e31c522a3c04a03f74c5761a8",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "9d9332ccefc045a40546dc6927c4eec25eba30f3"
|
||||
"sha2": "6e66df2230b0e2b796f06b5a6f75b2b6712197c4"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-assignment-delete-rest-test",
|
||||
@ -340,7 +340,7 @@
|
||||
"filePaths": [
|
||||
"assignment.go"
|
||||
],
|
||||
"sha1": "9d9332ccefc045a40546dc6927c4eec25eba30f3",
|
||||
"sha1": "6e66df2230b0e2b796f06b5a6f75b2b6712197c4",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "f188ae179ed0d21f86945cea19626149e969151f"
|
||||
"sha2": "61dd344cc3792e82ec56abad7147d239949bd8ac"
|
||||
}]
|
||||
|
@ -25,9 +25,9 @@
|
||||
"filePaths": [
|
||||
"const-declarations.go"
|
||||
],
|
||||
"sha1": "9e8b6854cb376c29a480a5a5fbbc055e13227cfd",
|
||||
"sha1": "0cb4e934b322d7dd1f49b43557f9aa2019eb81b6",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "5c264465d2d5b0f2b13770c4c571c91c3d581c3d"
|
||||
"sha2": "5942f47f53ee479e7ddae9e802624ac259fe11cc"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-replacement-insert-test",
|
||||
@ -71,9 +71,9 @@
|
||||
"filePaths": [
|
||||
"const-declarations.go"
|
||||
],
|
||||
"sha1": "5c264465d2d5b0f2b13770c4c571c91c3d581c3d",
|
||||
"sha1": "5942f47f53ee479e7ddae9e802624ac259fe11cc",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "328e9d44579e09fe55e2d48625ffc54c90cca16f"
|
||||
"sha2": "bcbfa60583e680dd82060f7ce777be5d17f18e7d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-delete-insert-test",
|
||||
@ -213,9 +213,9 @@
|
||||
"filePaths": [
|
||||
"const-declarations.go"
|
||||
],
|
||||
"sha1": "328e9d44579e09fe55e2d48625ffc54c90cca16f",
|
||||
"sha1": "bcbfa60583e680dd82060f7ce777be5d17f18e7d",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "75ead88fca4e5e1a83c4901d9410220d66ee5a74"
|
||||
"sha2": "f115231ebc7040802bd2662f794a5ae4511ad09e"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-replacement-test",
|
||||
@ -355,9 +355,9 @@
|
||||
"filePaths": [
|
||||
"const-declarations.go"
|
||||
],
|
||||
"sha1": "75ead88fca4e5e1a83c4901d9410220d66ee5a74",
|
||||
"sha1": "f115231ebc7040802bd2662f794a5ae4511ad09e",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "76db009eeaa9e79350336f2916624b1aabb9bef8"
|
||||
"sha2": "1b5ccaa01c8fd7d7b862349ac2cd71ccecbb219d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-delete-replacement-test",
|
||||
@ -416,9 +416,9 @@
|
||||
"filePaths": [
|
||||
"const-declarations.go"
|
||||
],
|
||||
"sha1": "76db009eeaa9e79350336f2916624b1aabb9bef8",
|
||||
"sha1": "1b5ccaa01c8fd7d7b862349ac2cd71ccecbb219d",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "529a98cf617a3fe11212c66e51d0507d0db6c319"
|
||||
"sha2": "3d374cebe8283b732aacd7b6b810c334a5572c04"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-delete-test",
|
||||
@ -447,9 +447,9 @@
|
||||
"filePaths": [
|
||||
"const-declarations.go"
|
||||
],
|
||||
"sha1": "529a98cf617a3fe11212c66e51d0507d0db6c319",
|
||||
"sha1": "3d374cebe8283b732aacd7b6b810c334a5572c04",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "6ae534557f3972270cabf341d6bf95a68f920f36"
|
||||
"sha2": "e9b19daab5721c5c9a72da765498ee49cb49894b"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-const-declarations-delete-rest-test",
|
||||
@ -478,7 +478,7 @@
|
||||
"filePaths": [
|
||||
"const-declarations.go"
|
||||
],
|
||||
"sha1": "6ae534557f3972270cabf341d6bf95a68f920f36",
|
||||
"sha1": "e9b19daab5721c5c9a72da765498ee49cb49894b",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "a77d9ca2b63f1f86d67ab41b9eb78cb66f348e2f"
|
||||
"sha2": "3d71cb8f8eb1a343f86944c2714d1e1035288dd3"
|
||||
}]
|
||||
|
@ -25,9 +25,9 @@
|
||||
"filePaths": [
|
||||
"function-call.go"
|
||||
],
|
||||
"sha1": "a3c24fc0df7d80ac011adc747efafdd0d17d38f9",
|
||||
"sha1": "61dd344cc3792e82ec56abad7147d239949bd8ac",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "7007fbf6346f12673317f05a975c79ce3017b3ce"
|
||||
"sha2": "6a9a2920960f64c860d64b640b0c779830072752"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-call-replacement-insert-test",
|
||||
@ -68,9 +68,9 @@
|
||||
"filePaths": [
|
||||
"function-call.go"
|
||||
],
|
||||
"sha1": "7007fbf6346f12673317f05a975c79ce3017b3ce",
|
||||
"sha1": "6a9a2920960f64c860d64b640b0c779830072752",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "144808f700dbdfb6a3e2f119d5881673e8e73466"
|
||||
"sha2": "318a932791df4c0b7dea5f003b712e49e4c24a5d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-call-delete-insert-test",
|
||||
@ -111,9 +111,9 @@
|
||||
"filePaths": [
|
||||
"function-call.go"
|
||||
],
|
||||
"sha1": "144808f700dbdfb6a3e2f119d5881673e8e73466",
|
||||
"sha1": "318a932791df4c0b7dea5f003b712e49e4c24a5d",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "b41c28aaac177600fdd1dd8abab696738ab423e6"
|
||||
"sha2": "3211d8ac9b2f48f22a5bc3e4bdf76e70bc759c72"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-call-replacement-test",
|
||||
@ -154,9 +154,9 @@
|
||||
"filePaths": [
|
||||
"function-call.go"
|
||||
],
|
||||
"sha1": "b41c28aaac177600fdd1dd8abab696738ab423e6",
|
||||
"sha1": "3211d8ac9b2f48f22a5bc3e4bdf76e70bc759c72",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "d1dd0ed2cf25f51083850bd15e110fabdc912d47"
|
||||
"sha2": "cfac8da38caa665b7bd6ab5a8da5e4f270e33b56"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-call-delete-replacement-test",
|
||||
@ -215,9 +215,9 @@
|
||||
"filePaths": [
|
||||
"function-call.go"
|
||||
],
|
||||
"sha1": "d1dd0ed2cf25f51083850bd15e110fabdc912d47",
|
||||
"sha1": "cfac8da38caa665b7bd6ab5a8da5e4f270e33b56",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "920b246c9e5be4d49ac4034160089ddf6ca8dd2c"
|
||||
"sha2": "bf71d26fdff3d4938d02e0d5c94eb1c331f198c4"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-call-delete-test",
|
||||
@ -258,9 +258,9 @@
|
||||
"filePaths": [
|
||||
"function-call.go"
|
||||
],
|
||||
"sha1": "920b246c9e5be4d49ac4034160089ddf6ca8dd2c",
|
||||
"sha1": "bf71d26fdff3d4938d02e0d5c94eb1c331f198c4",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "22b1b334a74d645756fc00c1f5ad41f4a5e3c660"
|
||||
"sha2": "498fc5855c0d1dadcef7000ae8da6f5fa2bec466"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-call-delete-rest-test",
|
||||
@ -289,7 +289,7 @@
|
||||
"filePaths": [
|
||||
"function-call.go"
|
||||
],
|
||||
"sha1": "22b1b334a74d645756fc00c1f5ad41f4a5e3c660",
|
||||
"sha1": "498fc5855c0d1dadcef7000ae8da6f5fa2bec466",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "ffe623490044f3cf30fa6f9b2fec74c0497cef62"
|
||||
"sha2": "b68f8e2c834d30ff74130dc77f5aac31366f42b0"
|
||||
}]
|
||||
|
592
test/corpus/diff-summaries/go/function-literal.json
Normal file
592
test/corpus/diff-summaries/go/function-literal.json
Normal file
@ -0,0 +1,592 @@
|
||||
[{
|
||||
"testCaseDescription": "go-function-literal-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literal.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'variable' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"function-literal.go"
|
||||
],
|
||||
"sha1": "b68f8e2c834d30ff74130dc77f5aac31366f42b0",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "1d7ad060d2d65581b58b2f309fa4155262f7f2ae"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literal-replacement-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literal.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'variable' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'variable' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"function-literal.go"
|
||||
],
|
||||
"sha1": "1d7ad060d2d65581b58b2f309fa4155262f7f2ae",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "6210023a695044de9a953829b2d9b43dcd998f28"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literal-delete-insert-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literal.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
18
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's' identifier in the const s1 = func(s string) (int, int) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
25
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'string' identifier in the const s1 = func(s string) (int, int) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
18
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' identifier in the const s1 = func(s string) (int, int) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
33
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
36
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'int' identifier in the const s1 = func(s string) (int, int) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
25
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
31
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'string' identifier in the const s1 = func(s string) (int, int) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
33
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
39
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'string' identifier in the const s1 = func(s string) (int, int) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
18
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 's' identifier in the const s1 = func(s string) (int, int) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
25
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'string' identifier in the const s1 = func(s string) (int, int) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
18
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'b' identifier in the const s1 = func(s string) (int, int) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
33
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
36
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'int' identifier in the const s1 = func(s string) (int, int) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
25
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
31
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'string' identifier in the const s1 = func(s string) (int, int) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
33
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
39
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'string' identifier in the const s1 = func(s string) (int, int) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"function-literal.go"
|
||||
],
|
||||
"sha1": "6210023a695044de9a953829b2d9b43dcd998f28",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "0161655f230b1c6f6638e2432c9484edeb79f774"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literal-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literal.go": [
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
18
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' identifier in the const s1 = func(b int) (string, string) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'int' identifier in the const s1 = func(b int) (string, string) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
18
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's' identifier in the const s1 = func(b int) (string, string) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
33
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
39
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'string' identifier in the const s1 = func(b int) (string, string) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
28
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
31
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'int' identifier in the const s1 = func(b int) (string, string) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
33
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
36
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'int' identifier in the const s1 = func(b int) (string, string) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
18
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'b' identifier in the const s1 = func(b int) (string, string) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
19
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
22
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'int' identifier in the const s1 = func(b int) (string, string) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
17
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
18
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 's' identifier in the const s1 = func(b int) (string, string) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
3,
|
||||
33
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
39
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'string' identifier in the const s1 = func(b int) (string, string) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
28
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
31
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'int' identifier in the const s1 = func(b int) (string, string) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
33
|
||||
],
|
||||
"end": [
|
||||
3,
|
||||
36
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'int' identifier in the const s1 = func(b int) (string, string) {\nreturn 1, 2\n} variable of the 'main' module statement"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"function-literal.go"
|
||||
],
|
||||
"sha1": "0161655f230b1c6f6638e2432c9484edeb79f774",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "74f772235f7094e0998f5f45ca2fd5f90976936d"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literal-delete-replacement-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literal.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'variable' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'variable' variable"
|
||||
},
|
||||
{
|
||||
"span": {
|
||||
"insert": {
|
||||
"start": [
|
||||
6,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
8,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Added the 'variable' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"function-literal.go"
|
||||
],
|
||||
"sha1": "74f772235f7094e0998f5f45ca2fd5f90976936d",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "73aecb62bd1f1eccaea9a5df70aef38755cb53c9"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literal-delete-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literal.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'variable' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"function-literal.go"
|
||||
],
|
||||
"sha1": "73aecb62bd1f1eccaea9a5df70aef38755cb53c9",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "d5e079e988e6b3539e1ab735aea928ea3cdf94b8"
|
||||
}
|
||||
,{
|
||||
"testCaseDescription": "go-function-literal-delete-rest-test",
|
||||
"expectedResult": {
|
||||
"changes": {
|
||||
"function-literal.go": [
|
||||
{
|
||||
"span": {
|
||||
"delete": {
|
||||
"start": [
|
||||
3,
|
||||
1
|
||||
],
|
||||
"end": [
|
||||
5,
|
||||
2
|
||||
]
|
||||
}
|
||||
},
|
||||
"summary": "Deleted the 'variable' variable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"errors": {}
|
||||
},
|
||||
"filePaths": [
|
||||
"function-literal.go"
|
||||
],
|
||||
"sha1": "d5e079e988e6b3539e1ab735aea928ea3cdf94b8",
|
||||
"gitDir": "test/corpus/repos/go",
|
||||
"sha2": "0cb4e934b322d7dd1f49b43557f9aa2019eb81b6"
|
||||
}]
|
@ -19,6 +19,13 @@
|
||||
"testCaseFilePath": "test/corpus/diff-summaries/go/function-call.json",
|
||||
"replacement": "b()"
|
||||
},
|
||||
{
|
||||
"syntax": "function-literal",
|
||||
"repoFilePath": "function-literal.go",
|
||||
"insert": "const s1 = func(s string) (int, int) {\nreturn 1, 2\n}",
|
||||
"testCaseFilePath": "test/corpus/diff-summaries/go/function-call.json",
|
||||
"replacement": "const s1 = func(b int) (string, string) {\nreturn 1, 2\n}"
|
||||
},
|
||||
{
|
||||
"syntax": "const-declarations",
|
||||
"repoFilePath": "const-declarations.go",
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit a77d9ca2b63f1f86d67ab41b9eb78cb66f348e2f
|
||||
Subproject commit 3d71cb8f8eb1a343f86944c2714d1e1035288dd3
|
Loading…
Reference in New Issue
Block a user