2016-11-02 17:50:05 +03:00
|
|
|
[{
|
|
|
|
"testCaseDescription": "go-function-declarations-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"function-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'f1' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
9
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'a' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
11
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
16
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'b' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
20
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'c' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
30
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'string' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
32
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
36
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
18
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'result' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
27
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'err' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
28
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
33
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
37
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '{}' block"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"function-declarations.go"
|
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/function-declarations.go b/function-declarations.go",
|
|
|
|
"index e69de29..21da2ea 100644",
|
|
|
|
"--- a/function-declarations.go",
|
|
|
|
"+++ b/function-declarations.go",
|
|
|
|
"@@ -0,0 +1,4 @@",
|
|
|
|
"+func f1() {}",
|
|
|
|
"+func f2(a int, b, c, d string) int {}",
|
|
|
|
"+func f2() (int, error) {}",
|
|
|
|
"+func f2() (result int, err error) {}"
|
|
|
|
],
|
2016-11-02 17:50:05 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 21:51:11 +03:00
|
|
|
"shas": "8dd40bb91580306459251df1f1029fc05d9268f8..3c3cfbd318f66bda6c2ff6f4dd83c5f07b5d3392"
|
2016-11-02 17:50:05 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-function-declarations-replacement-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"function-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'fa' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'fb' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
9
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'a' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
11
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
16
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'b' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
20
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'c' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
30
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'string' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
32
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
36
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'fc' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'fd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
18
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'result' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
27
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'err' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
28
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
33
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
37
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 17:50:05 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'f1' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
9
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'a' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
11
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
16
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'b' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
20
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'c' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
30
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'string' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
32
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
36
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
18
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'result' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
27
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'err' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
28
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
33
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
37
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '{}' block"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"function-declarations.go"
|
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/function-declarations.go b/function-declarations.go",
|
|
|
|
"index 21da2ea..768679a 100644",
|
|
|
|
"--- a/function-declarations.go",
|
|
|
|
"+++ b/function-declarations.go",
|
|
|
|
"@@ -1,3 +1,11 @@",
|
|
|
|
"+func fa() {}",
|
|
|
|
"+func fb(a int, b, c, d string) int {}",
|
|
|
|
"+func fc() (int, error) {}",
|
|
|
|
"+func fd() (result int, err error) {}",
|
|
|
|
"+func f1() {}",
|
|
|
|
"+func f2(a int, b, c, d string) int {}",
|
|
|
|
"+func f2() (int, error) {}",
|
|
|
|
"+func f2() (result int, err error) {}",
|
|
|
|
" func f1() {}",
|
|
|
|
" func f2(a int, b, c, d string) int {}",
|
|
|
|
" func f2() (int, error) {}"
|
|
|
|
],
|
2016-11-02 17:50:05 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 21:51:11 +03:00
|
|
|
"shas": "3c3cfbd318f66bda6c2ff6f4dd83c5f07b5d3392..30a422712b0c49e2ea12eb277e47a9845df28e83"
|
2016-11-02 17:50:05 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-function-declarations-delete-insert-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"function-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-11 00:19:53 +03:00
|
|
|
"summary": "Replaced the 'fa' identifier with the 'f1' identifier in the f1 function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'fb' identifier with the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'fc' identifier with the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'fd' identifier with the 'f2' identifier"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"function-declarations.go"
|
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/function-declarations.go b/function-declarations.go",
|
|
|
|
"index 768679a..da899b5 100644",
|
|
|
|
"--- a/function-declarations.go",
|
|
|
|
"+++ b/function-declarations.go",
|
|
|
|
"@@ -1,7 +1,7 @@",
|
|
|
|
"-func fa() {}",
|
|
|
|
"-func fb(a int, b, c, d string) int {}",
|
|
|
|
"-func fc() (int, error) {}",
|
|
|
|
"-func fd() (result int, err error) {}",
|
|
|
|
"+func f1() {}",
|
|
|
|
"+func f2(a int, b, c, d string) int {}",
|
|
|
|
"+func f2() (int, error) {}",
|
|
|
|
"+func f2() (result int, err error) {}",
|
|
|
|
" func f1() {}",
|
|
|
|
" func f2(a int, b, c, d string) int {}",
|
|
|
|
" func f2() (int, error) {}"
|
|
|
|
],
|
2016-11-02 17:50:05 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 21:51:11 +03:00
|
|
|
"shas": "30a422712b0c49e2ea12eb277e47a9845df28e83..673287894ebdcf184351f0511ecd3212091e1ca9"
|
2016-11-02 17:50:05 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-function-declarations-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"function-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2016-11-11 00:19:53 +03:00
|
|
|
"summary": "Replaced the 'f1' identifier with the 'fa' identifier in the fa function"
|
2016-11-02 17:50:05 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'f2' identifier with the 'fb' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'f2' identifier with the 'fc' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"replace": [
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"summary": "Replaced the 'f2' identifier with the 'fd' identifier"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"function-declarations.go"
|
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/function-declarations.go b/function-declarations.go",
|
|
|
|
"index da899b5..768679a 100644",
|
|
|
|
"--- a/function-declarations.go",
|
|
|
|
"+++ b/function-declarations.go",
|
|
|
|
"@@ -1,7 +1,7 @@",
|
|
|
|
"-func f1() {}",
|
|
|
|
"-func f2(a int, b, c, d string) int {}",
|
|
|
|
"-func f2() (int, error) {}",
|
|
|
|
"-func f2() (result int, err error) {}",
|
|
|
|
"+func fa() {}",
|
|
|
|
"+func fb(a int, b, c, d string) int {}",
|
|
|
|
"+func fc() (int, error) {}",
|
|
|
|
"+func fd() (result int, err error) {}",
|
|
|
|
" func f1() {}",
|
|
|
|
" func f2(a int, b, c, d string) int {}",
|
|
|
|
" func f2() (int, error) {}"
|
|
|
|
],
|
2016-11-02 17:50:05 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 21:51:11 +03:00
|
|
|
"shas": "673287894ebdcf184351f0511ecd3212091e1ca9..5f59e09781b11fd553ec06bd339bd351a255df93"
|
2016-11-02 17:50:05 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-function-declarations-delete-replacement-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"function-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'fa' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'fb' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
9
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'a' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
11
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
16
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'b' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
20
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'c' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
30
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'string' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
32
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
36
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'fc' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'fd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
18
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'result' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
27
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'err' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
28
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
33
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
37
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 17:50:05 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'f1' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
9
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'a' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
11
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
16
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'b' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
20
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'c' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
30
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'string' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
32
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
36
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
18
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'result' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
27
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'err' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
28
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
33
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
37
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 17:50:05 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
5,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'fa' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'fb' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
9
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'a' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
11
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
16
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'b' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
20
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'c' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
30
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'string' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
32
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
36
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
6,
|
2016-11-02 17:50:05 +03:00
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'fc' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
7,
|
2016-11-02 17:50:05 +03:00
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'fd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
18
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'result' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
27
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'err' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
28
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
33
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"insert": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
8,
|
2016-11-02 17:50:05 +03:00
|
|
|
37
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Added the '{}' block"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"function-declarations.go"
|
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/function-declarations.go b/function-declarations.go",
|
|
|
|
"index 768679a..306f918 100644",
|
|
|
|
"--- a/function-declarations.go",
|
|
|
|
"+++ b/function-declarations.go",
|
|
|
|
"@@ -1,12 +1,8 @@",
|
|
|
|
"-func fa() {}",
|
|
|
|
"-func fb(a int, b, c, d string) int {}",
|
|
|
|
"-func fc() (int, error) {}",
|
|
|
|
"-func fd() (result int, err error) {}",
|
|
|
|
"-func f1() {}",
|
|
|
|
"-func f2(a int, b, c, d string) int {}",
|
|
|
|
"-func f2() (int, error) {}",
|
|
|
|
"-func f2() (result int, err error) {}",
|
|
|
|
" func f1() {}",
|
|
|
|
" func f2(a int, b, c, d string) int {}",
|
|
|
|
" func f2() (int, error) {}",
|
|
|
|
" func f2() (result int, err error) {}",
|
|
|
|
"+func fa() {}",
|
|
|
|
"+func fb(a int, b, c, d string) int {}",
|
|
|
|
"+func fc() (int, error) {}",
|
|
|
|
"+func fd() (result int, err error) {}"
|
|
|
|
],
|
2016-11-02 17:50:05 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 21:51:11 +03:00
|
|
|
"shas": "5f59e09781b11fd553ec06bd339bd351a255df93..dc9ae6ff616858e0bce27734c7740fd0fd1fb74c"
|
2016-11-02 17:50:05 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-function-declarations-delete-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"function-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'f1' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
9
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'a' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
11
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
16
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'b' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
20
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'c' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
30
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'string' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
32
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
36
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'f2' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
18
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'result' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
27
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'err' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
28
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
33
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
37
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '{}' block"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"function-declarations.go"
|
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/function-declarations.go b/function-declarations.go",
|
|
|
|
"index 306f918..cc84bb3 100644",
|
|
|
|
"--- a/function-declarations.go",
|
|
|
|
"+++ b/function-declarations.go",
|
|
|
|
"@@ -1,7 +1,3 @@",
|
|
|
|
"-func f1() {}",
|
|
|
|
"-func f2(a int, b, c, d string) int {}",
|
|
|
|
"-func f2() (int, error) {}",
|
|
|
|
"-func f2() (result int, err error) {}",
|
|
|
|
" func fa() {}",
|
|
|
|
" func fb(a int, b, c, d string) int {}",
|
|
|
|
" func fc() (int, error) {}"
|
|
|
|
],
|
2016-11-02 17:50:05 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 21:51:11 +03:00
|
|
|
"shas": "dc9ae6ff616858e0bce27734c7740fd0fd1fb74c..23379b519c471e14ee16c665dd5485618a6df571"
|
2016-11-02 17:50:05 +03:00
|
|
|
}
|
|
|
|
,{
|
|
|
|
"testCaseDescription": "go-function-declarations-delete-rest-test",
|
|
|
|
"expectedResult": {
|
|
|
|
"changes": {
|
|
|
|
"function-declarations.go": [
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
1
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
1,
|
2016-11-02 17:50:05 +03:00
|
|
|
13
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'fa' function"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'fb' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
9
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'a' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
11
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
14
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
16
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'b' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
20
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'c' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
23
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
30
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'string' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
32
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
36
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
2,
|
2016-11-02 17:50:05 +03:00
|
|
|
38
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'fc' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
15
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
17
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
3,
|
2016-11-02 17:50:05 +03:00
|
|
|
26
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '{}' block"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
6
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'fd' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
8
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
10
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '()' arguments"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
12
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
18
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'result' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
19
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
22
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'int' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
24
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
27
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'err' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
28
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
33
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the 'error' identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"span": {
|
|
|
|
"delete": {
|
|
|
|
"start": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
35
|
|
|
|
],
|
|
|
|
"end": [
|
2016-11-11 00:19:53 +03:00
|
|
|
4,
|
2016-11-02 17:50:05 +03:00
|
|
|
37
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"summary": "Deleted the '{}' block"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"errors": {}
|
|
|
|
},
|
|
|
|
"filePaths": [
|
|
|
|
"function-declarations.go"
|
|
|
|
],
|
2016-11-11 00:19:53 +03:00
|
|
|
"patch": [
|
|
|
|
"diff --git a/function-declarations.go b/function-declarations.go",
|
|
|
|
"index cc84bb3..e69de29 100644",
|
|
|
|
"--- a/function-declarations.go",
|
|
|
|
"+++ b/function-declarations.go",
|
|
|
|
"@@ -1,4 +0,0 @@",
|
|
|
|
"-func fa() {}",
|
|
|
|
"-func fb(a int, b, c, d string) int {}",
|
|
|
|
"-func fc() (int, error) {}",
|
|
|
|
"-func fd() (result int, err error) {}"
|
|
|
|
],
|
2016-11-02 17:50:05 +03:00
|
|
|
"gitDir": "test/corpus/repos/go",
|
2016-11-22 21:51:11 +03:00
|
|
|
"shas": "23379b519c471e14ee16c665dd5485618a6df571..bd6863ea897df8ffa4a3b1d5e6bce6d32cc332a3"
|
2016-11-02 17:50:05 +03:00
|
|
|
}]
|