danger-code_coverage 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +32 -0
- data/.rubocop.yml +3873 -0
- data/.travis.yml +34 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +22 -0
- data/README.md +109 -0
- data/Rakefile +28 -0
- data/danger-code_coverage.gemspec +41 -0
- data/lib/code_coverage/coverage_item.rb +13 -0
- data/lib/code_coverage/coverage_parser.rb +77 -0
- data/lib/code_coverage/gem_version.rb +5 -0
- data/lib/code_coverage/markdown_table.rb +53 -0
- data/lib/code_coverage/plugin.rb +155 -0
- data/lib/danger_code_coverage.rb +3 -0
- data/lib/danger_plugin.rb +3 -0
- data/sonar-project.properties +9 -0
- data/spec/assets/coverage_cobertura_python.json +519 -0
- data/spec/assets/coverage_cobertura_single.json +183 -0
- data/spec/assets/coverage_dot_package_single.json +189 -0
- data/spec/assets/coverage_jacoco.json +1004 -0
- data/spec/assets/coverage_jacoco_multiple_unordered.json +328 -0
- data/spec/assets/coverage_jacoco_no_conditional.json +238 -0
- data/spec/assets/coverage_jacoco_single.json +250 -0
- data/spec/assets/coverage_no_files.json +65 -0
- data/spec/assets/missing_json.html +7 -0
- data/spec/code_coverage_spec.rb +134 -0
- data/spec/coverage_parser_spec.rb +85 -0
- data/spec/spec_helper.rb +72 -0
- metadata +239 -0
@@ -0,0 +1,328 @@
|
|
1
|
+
{
|
2
|
+
"_class": "io.jenkins.plugins.coverage.targets.CoverageResult",
|
3
|
+
"results": {
|
4
|
+
"children": [
|
5
|
+
{
|
6
|
+
"children": [
|
7
|
+
{
|
8
|
+
"children": [
|
9
|
+
{
|
10
|
+
"children": [
|
11
|
+
{
|
12
|
+
"children": [
|
13
|
+
{},
|
14
|
+
{}
|
15
|
+
],
|
16
|
+
"elements": [
|
17
|
+
{
|
18
|
+
"denominator": 2.0,
|
19
|
+
"name": "Class",
|
20
|
+
"numerator": 0.0,
|
21
|
+
"ratio": 0.0
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"denominator": 7.0,
|
25
|
+
"name": "Method",
|
26
|
+
"numerator": 0.0,
|
27
|
+
"ratio": 0.0
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"denominator": 75.0,
|
31
|
+
"name": "Instruction",
|
32
|
+
"numerator": 0.0,
|
33
|
+
"ratio": 0.0
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"denominator": 21.0,
|
37
|
+
"name": "Line",
|
38
|
+
"numerator": 0.0,
|
39
|
+
"ratio": 0.0
|
40
|
+
},
|
41
|
+
{
|
42
|
+
"denominator": 2.0,
|
43
|
+
"name": "Conditional",
|
44
|
+
"numerator": 0.0,
|
45
|
+
"ratio": 0.0
|
46
|
+
}
|
47
|
+
],
|
48
|
+
"name": "MainActivity.java"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"children": [
|
52
|
+
{},
|
53
|
+
{}
|
54
|
+
],
|
55
|
+
"elements": [
|
56
|
+
{
|
57
|
+
"denominator": 2.0,
|
58
|
+
"name": "Class",
|
59
|
+
"numerator": 0.0,
|
60
|
+
"ratio": 0.0
|
61
|
+
},
|
62
|
+
{
|
63
|
+
"denominator": 7.0,
|
64
|
+
"name": "Method",
|
65
|
+
"numerator": 0.0,
|
66
|
+
"ratio": 13.3444
|
67
|
+
},
|
68
|
+
{
|
69
|
+
"denominator": 75.0,
|
70
|
+
"name": "Instruction",
|
71
|
+
"numerator": 0.0,
|
72
|
+
"ratio": 65.442
|
73
|
+
},
|
74
|
+
{
|
75
|
+
"denominator": 21.0,
|
76
|
+
"name": "Line",
|
77
|
+
"numerator": 0.0,
|
78
|
+
"ratio": 75.0
|
79
|
+
},
|
80
|
+
{
|
81
|
+
"denominator": 2.0,
|
82
|
+
"name": "Conditional",
|
83
|
+
"numerator": 0.0,
|
84
|
+
"ratio": 49.99
|
85
|
+
}
|
86
|
+
],
|
87
|
+
"name": "MainActivity2.java"
|
88
|
+
},
|
89
|
+
{
|
90
|
+
"children": [
|
91
|
+
{},
|
92
|
+
{}
|
93
|
+
],
|
94
|
+
"elements": [
|
95
|
+
{
|
96
|
+
"denominator": 2.0,
|
97
|
+
"name": "Class",
|
98
|
+
"numerator": 0.0,
|
99
|
+
"ratio": 0.0
|
100
|
+
},
|
101
|
+
{
|
102
|
+
"denominator": 7.0,
|
103
|
+
"name": "Method",
|
104
|
+
"numerator": 0.0,
|
105
|
+
"ratio": 13.3444
|
106
|
+
},
|
107
|
+
{
|
108
|
+
"denominator": 75.0,
|
109
|
+
"name": "Instruction",
|
110
|
+
"numerator": 0.0,
|
111
|
+
"ratio": 15.442
|
112
|
+
},
|
113
|
+
{
|
114
|
+
"denominator": 21.0,
|
115
|
+
"name": "Line",
|
116
|
+
"numerator": 0.0,
|
117
|
+
"ratio": 30.0
|
118
|
+
},
|
119
|
+
{
|
120
|
+
"denominator": 2.0,
|
121
|
+
"name": "Conditional",
|
122
|
+
"numerator": 0.0,
|
123
|
+
"ratio": 20.99
|
124
|
+
}
|
125
|
+
],
|
126
|
+
"name": "MainActivity3.java"
|
127
|
+
}
|
128
|
+
],
|
129
|
+
"elements": [
|
130
|
+
{
|
131
|
+
"denominator": 3.0,
|
132
|
+
"name": "File",
|
133
|
+
"numerator": 1.0,
|
134
|
+
"ratio": 33.333332
|
135
|
+
},
|
136
|
+
{
|
137
|
+
"denominator": 4.0,
|
138
|
+
"name": "Class",
|
139
|
+
"numerator": 1.0,
|
140
|
+
"ratio": 25.0
|
141
|
+
},
|
142
|
+
{
|
143
|
+
"denominator": 15.0,
|
144
|
+
"name": "Method",
|
145
|
+
"numerator": 1.0,
|
146
|
+
"ratio": 6.6666665
|
147
|
+
},
|
148
|
+
{
|
149
|
+
"denominator": 110.0,
|
150
|
+
"name": "Instruction",
|
151
|
+
"numerator": 6.0,
|
152
|
+
"ratio": 5.4545455
|
153
|
+
},
|
154
|
+
{
|
155
|
+
"denominator": 34.0,
|
156
|
+
"name": "Line",
|
157
|
+
"numerator": 1.0,
|
158
|
+
"ratio": 2.9411764
|
159
|
+
},
|
160
|
+
{
|
161
|
+
"denominator": 6.0,
|
162
|
+
"name": "Conditional",
|
163
|
+
"numerator": 2.0,
|
164
|
+
"ratio": 33.333332
|
165
|
+
}
|
166
|
+
],
|
167
|
+
"name": "com/example/kyaak/myapplication"
|
168
|
+
}
|
169
|
+
],
|
170
|
+
"elements": [
|
171
|
+
{
|
172
|
+
"denominator": 5.0,
|
173
|
+
"name": "Package",
|
174
|
+
"numerator": 3.0,
|
175
|
+
"ratio": 60.0
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"denominator": 18.0,
|
179
|
+
"name": "File",
|
180
|
+
"numerator": 3.0,
|
181
|
+
"ratio": 16.666666
|
182
|
+
},
|
183
|
+
{
|
184
|
+
"denominator": 21.0,
|
185
|
+
"name": "Class",
|
186
|
+
"numerator": 3.0,
|
187
|
+
"ratio": 14.285714
|
188
|
+
},
|
189
|
+
{
|
190
|
+
"denominator": 193.0,
|
191
|
+
"name": "Method",
|
192
|
+
"numerator": 6.0,
|
193
|
+
"ratio": 3.1088083
|
194
|
+
},
|
195
|
+
{
|
196
|
+
"denominator": 2169.0,
|
197
|
+
"name": "Instruction",
|
198
|
+
"numerator": 52.0,
|
199
|
+
"ratio": 2.3974183
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"denominator": 296.0,
|
203
|
+
"name": "Line",
|
204
|
+
"numerator": 9.0,
|
205
|
+
"ratio": 3.0405405
|
206
|
+
},
|
207
|
+
{
|
208
|
+
"denominator": 178.0,
|
209
|
+
"name": "Conditional",
|
210
|
+
"numerator": 3.0,
|
211
|
+
"ratio": 1.6853932
|
212
|
+
}
|
213
|
+
],
|
214
|
+
"name": "project"
|
215
|
+
}
|
216
|
+
],
|
217
|
+
"elements": [
|
218
|
+
{
|
219
|
+
"denominator": 1.0,
|
220
|
+
"name": "Group",
|
221
|
+
"numerator": 1.0,
|
222
|
+
"ratio": 100.0
|
223
|
+
},
|
224
|
+
{
|
225
|
+
"denominator": 5.0,
|
226
|
+
"name": "Package",
|
227
|
+
"numerator": 3.0,
|
228
|
+
"ratio": 60.0
|
229
|
+
},
|
230
|
+
{
|
231
|
+
"denominator": 18.0,
|
232
|
+
"name": "File",
|
233
|
+
"numerator": 3.0,
|
234
|
+
"ratio": 16.666666
|
235
|
+
},
|
236
|
+
{
|
237
|
+
"denominator": 21.0,
|
238
|
+
"name": "Class",
|
239
|
+
"numerator": 3.0,
|
240
|
+
"ratio": 14.285714
|
241
|
+
},
|
242
|
+
{
|
243
|
+
"denominator": 193.0,
|
244
|
+
"name": "Method",
|
245
|
+
"numerator": 6.0,
|
246
|
+
"ratio": 3.1088083
|
247
|
+
},
|
248
|
+
{
|
249
|
+
"denominator": 2169.0,
|
250
|
+
"name": "Instruction",
|
251
|
+
"numerator": 52.0,
|
252
|
+
"ratio": 2.3974183
|
253
|
+
},
|
254
|
+
{
|
255
|
+
"denominator": 296.0,
|
256
|
+
"name": "Line",
|
257
|
+
"numerator": 9.0,
|
258
|
+
"ratio": 3.0405405
|
259
|
+
},
|
260
|
+
{
|
261
|
+
"denominator": 178.0,
|
262
|
+
"name": "Conditional",
|
263
|
+
"numerator": 3.0,
|
264
|
+
"ratio": 1.6853932
|
265
|
+
}
|
266
|
+
],
|
267
|
+
"name": "code_quality: jacoco.xml"
|
268
|
+
}
|
269
|
+
],
|
270
|
+
"elements": [
|
271
|
+
{
|
272
|
+
"denominator": 1.0,
|
273
|
+
"name": "Report",
|
274
|
+
"numerator": 1.0,
|
275
|
+
"ratio": 100.0
|
276
|
+
},
|
277
|
+
{
|
278
|
+
"denominator": 1.0,
|
279
|
+
"name": "Group",
|
280
|
+
"numerator": 1.0,
|
281
|
+
"ratio": 100.0
|
282
|
+
},
|
283
|
+
{
|
284
|
+
"denominator": 5.0,
|
285
|
+
"name": "Package",
|
286
|
+
"numerator": 3.0,
|
287
|
+
"ratio": 60.0
|
288
|
+
},
|
289
|
+
{
|
290
|
+
"denominator": 18.0,
|
291
|
+
"name": "File",
|
292
|
+
"numerator": 3.0,
|
293
|
+
"ratio": 16.666666
|
294
|
+
},
|
295
|
+
{
|
296
|
+
"denominator": 21.0,
|
297
|
+
"name": "Class",
|
298
|
+
"numerator": 3.0,
|
299
|
+
"ratio": 14.285714
|
300
|
+
},
|
301
|
+
{
|
302
|
+
"denominator": 193.0,
|
303
|
+
"name": "Method",
|
304
|
+
"numerator": 6.0,
|
305
|
+
"ratio": 3.1088083
|
306
|
+
},
|
307
|
+
{
|
308
|
+
"denominator": 2169.0,
|
309
|
+
"name": "Instruction",
|
310
|
+
"numerator": 52.0,
|
311
|
+
"ratio": 2.3974183
|
312
|
+
},
|
313
|
+
{
|
314
|
+
"denominator": 296.0,
|
315
|
+
"name": "Line",
|
316
|
+
"numerator": 9.0,
|
317
|
+
"ratio": 3.0405405
|
318
|
+
},
|
319
|
+
{
|
320
|
+
"denominator": 178.0,
|
321
|
+
"name": "Conditional",
|
322
|
+
"numerator": 3.0,
|
323
|
+
"ratio": 1.6853932
|
324
|
+
}
|
325
|
+
],
|
326
|
+
"name": "All reports"
|
327
|
+
}
|
328
|
+
}
|
@@ -0,0 +1,238 @@
|
|
1
|
+
{
|
2
|
+
"_class": "io.jenkins.plugins.coverage.targets.CoverageResult",
|
3
|
+
"results": {
|
4
|
+
"children": [
|
5
|
+
{
|
6
|
+
"children": [
|
7
|
+
{
|
8
|
+
"children": [
|
9
|
+
{
|
10
|
+
"children": [
|
11
|
+
{
|
12
|
+
"children": [
|
13
|
+
{},
|
14
|
+
{}
|
15
|
+
],
|
16
|
+
"elements": [
|
17
|
+
{
|
18
|
+
"denominator": 2.0,
|
19
|
+
"name": "Class",
|
20
|
+
"numerator": 0.0,
|
21
|
+
"ratio": 0.0
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"denominator": 7.0,
|
25
|
+
"name": "Method",
|
26
|
+
"numerator": 0.0,
|
27
|
+
"ratio": 13.3444
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"denominator": 75.0,
|
31
|
+
"name": "Instruction",
|
32
|
+
"numerator": 0.0,
|
33
|
+
"ratio": 65.442
|
34
|
+
},
|
35
|
+
{
|
36
|
+
"denominator": 21.0,
|
37
|
+
"name": "Line",
|
38
|
+
"numerator": 0.0,
|
39
|
+
"ratio": 75.0
|
40
|
+
}
|
41
|
+
],
|
42
|
+
"name": "MainActivity.java"
|
43
|
+
}
|
44
|
+
],
|
45
|
+
"elements": [
|
46
|
+
{
|
47
|
+
"denominator": 3.0,
|
48
|
+
"name": "File",
|
49
|
+
"numerator": 1.0,
|
50
|
+
"ratio": 33.333332
|
51
|
+
},
|
52
|
+
{
|
53
|
+
"denominator": 4.0,
|
54
|
+
"name": "Class",
|
55
|
+
"numerator": 1.0,
|
56
|
+
"ratio": 25.0
|
57
|
+
},
|
58
|
+
{
|
59
|
+
"denominator": 15.0,
|
60
|
+
"name": "Method",
|
61
|
+
"numerator": 1.0,
|
62
|
+
"ratio": 6.6666665
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"denominator": 110.0,
|
66
|
+
"name": "Instruction",
|
67
|
+
"numerator": 6.0,
|
68
|
+
"ratio": 5.4545455
|
69
|
+
},
|
70
|
+
{
|
71
|
+
"denominator": 34.0,
|
72
|
+
"name": "Line",
|
73
|
+
"numerator": 1.0,
|
74
|
+
"ratio": 2.9411764
|
75
|
+
}
|
76
|
+
],
|
77
|
+
"name": "com/example/kyaak/myapplication"
|
78
|
+
}
|
79
|
+
],
|
80
|
+
"elements": [
|
81
|
+
{
|
82
|
+
"denominator": 5.0,
|
83
|
+
"name": "Package",
|
84
|
+
"numerator": 3.0,
|
85
|
+
"ratio": 60.0
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"denominator": 18.0,
|
89
|
+
"name": "File",
|
90
|
+
"numerator": 3.0,
|
91
|
+
"ratio": 16.666666
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"denominator": 21.0,
|
95
|
+
"name": "Class",
|
96
|
+
"numerator": 3.0,
|
97
|
+
"ratio": 14.285714
|
98
|
+
},
|
99
|
+
{
|
100
|
+
"denominator": 193.0,
|
101
|
+
"name": "Method",
|
102
|
+
"numerator": 6.0,
|
103
|
+
"ratio": 3.1088083
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"denominator": 2169.0,
|
107
|
+
"name": "Instruction",
|
108
|
+
"numerator": 52.0,
|
109
|
+
"ratio": 2.3974183
|
110
|
+
},
|
111
|
+
{
|
112
|
+
"denominator": 296.0,
|
113
|
+
"name": "Line",
|
114
|
+
"numerator": 9.0,
|
115
|
+
"ratio": 3.0405405
|
116
|
+
},
|
117
|
+
{
|
118
|
+
"denominator": 178.0,
|
119
|
+
"name": "Conditional",
|
120
|
+
"numerator": 3.0,
|
121
|
+
"ratio": 1.6853932
|
122
|
+
}
|
123
|
+
],
|
124
|
+
"name": "project"
|
125
|
+
}
|
126
|
+
],
|
127
|
+
"elements": [
|
128
|
+
{
|
129
|
+
"denominator": 1.0,
|
130
|
+
"name": "Group",
|
131
|
+
"numerator": 1.0,
|
132
|
+
"ratio": 100.0
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"denominator": 5.0,
|
136
|
+
"name": "Package",
|
137
|
+
"numerator": 3.0,
|
138
|
+
"ratio": 60.0
|
139
|
+
},
|
140
|
+
{
|
141
|
+
"denominator": 18.0,
|
142
|
+
"name": "File",
|
143
|
+
"numerator": 3.0,
|
144
|
+
"ratio": 16.666666
|
145
|
+
},
|
146
|
+
{
|
147
|
+
"denominator": 21.0,
|
148
|
+
"name": "Class",
|
149
|
+
"numerator": 3.0,
|
150
|
+
"ratio": 14.285714
|
151
|
+
},
|
152
|
+
{
|
153
|
+
"denominator": 193.0,
|
154
|
+
"name": "Method",
|
155
|
+
"numerator": 6.0,
|
156
|
+
"ratio": 3.1088083
|
157
|
+
},
|
158
|
+
{
|
159
|
+
"denominator": 2169.0,
|
160
|
+
"name": "Instruction",
|
161
|
+
"numerator": 52.0,
|
162
|
+
"ratio": 2.3974183
|
163
|
+
},
|
164
|
+
{
|
165
|
+
"denominator": 296.0,
|
166
|
+
"name": "Line",
|
167
|
+
"numerator": 9.0,
|
168
|
+
"ratio": 3.0405405
|
169
|
+
},
|
170
|
+
{
|
171
|
+
"denominator": 178.0,
|
172
|
+
"name": "Conditional",
|
173
|
+
"numerator": 3.0,
|
174
|
+
"ratio": 1.6853932
|
175
|
+
}
|
176
|
+
],
|
177
|
+
"name": "code_quality: jacoco.xml"
|
178
|
+
}
|
179
|
+
],
|
180
|
+
"elements": [
|
181
|
+
{
|
182
|
+
"denominator": 1.0,
|
183
|
+
"name": "Report",
|
184
|
+
"numerator": 1.0,
|
185
|
+
"ratio": 100.0
|
186
|
+
},
|
187
|
+
{
|
188
|
+
"denominator": 1.0,
|
189
|
+
"name": "Group",
|
190
|
+
"numerator": 1.0,
|
191
|
+
"ratio": 100.0
|
192
|
+
},
|
193
|
+
{
|
194
|
+
"denominator": 5.0,
|
195
|
+
"name": "Package",
|
196
|
+
"numerator": 3.0,
|
197
|
+
"ratio": 60.0
|
198
|
+
},
|
199
|
+
{
|
200
|
+
"denominator": 18.0,
|
201
|
+
"name": "File",
|
202
|
+
"numerator": 3.0,
|
203
|
+
"ratio": 16.666666
|
204
|
+
},
|
205
|
+
{
|
206
|
+
"denominator": 21.0,
|
207
|
+
"name": "Class",
|
208
|
+
"numerator": 3.0,
|
209
|
+
"ratio": 14.285714
|
210
|
+
},
|
211
|
+
{
|
212
|
+
"denominator": 193.0,
|
213
|
+
"name": "Method",
|
214
|
+
"numerator": 6.0,
|
215
|
+
"ratio": 3.1088083
|
216
|
+
},
|
217
|
+
{
|
218
|
+
"denominator": 2169.0,
|
219
|
+
"name": "Instruction",
|
220
|
+
"numerator": 52.0,
|
221
|
+
"ratio": 2.3974183
|
222
|
+
},
|
223
|
+
{
|
224
|
+
"denominator": 296.0,
|
225
|
+
"name": "Line",
|
226
|
+
"numerator": 9.0,
|
227
|
+
"ratio": 3.0405405
|
228
|
+
},
|
229
|
+
{
|
230
|
+
"denominator": 178.0,
|
231
|
+
"name": "Conditional",
|
232
|
+
"numerator": 3.0,
|
233
|
+
"ratio": 1.6853932
|
234
|
+
}
|
235
|
+
],
|
236
|
+
"name": "All reports"
|
237
|
+
}
|
238
|
+
}
|