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,9 @@
|
|
1
|
+
sonar.projectKey=Kyaak_danger-code_coverage
|
2
|
+
sonar.sources=lib
|
3
|
+
sonar.tests=spec
|
4
|
+
|
5
|
+
sonar.ruby.file.suffixes=rb,ruby
|
6
|
+
sonar.ruby.coverage.reportPath=coverage/.resultset.json
|
7
|
+
sonar.ruby.coverage.framework=RSpec
|
8
|
+
sonar.ruby.rubocopConfig=.rubocop.yml
|
9
|
+
sonar.ruby.rubocop.reportPath=rubocop-result.json
|
@@ -0,0 +1,519 @@
|
|
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
|
+
"elements": [
|
16
|
+
{
|
17
|
+
"denominator": 1.0,
|
18
|
+
"name": "Class",
|
19
|
+
"numerator": 0.0,
|
20
|
+
"ratio": 0.0
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"denominator": 35.0,
|
24
|
+
"name": "Line",
|
25
|
+
"numerator": 0.0,
|
26
|
+
"ratio": 0.0
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"denominator": 4.0,
|
30
|
+
"name": "Conditional",
|
31
|
+
"numerator": 0.0,
|
32
|
+
"ratio": 0.0
|
33
|
+
}
|
34
|
+
],
|
35
|
+
"name": "generator.py"
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"children": [
|
39
|
+
{}
|
40
|
+
],
|
41
|
+
"elements": [
|
42
|
+
{
|
43
|
+
"denominator": 1.0,
|
44
|
+
"name": "Class",
|
45
|
+
"numerator": 1.0,
|
46
|
+
"ratio": 100.0
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"denominator": 91.0,
|
50
|
+
"name": "Line",
|
51
|
+
"numerator": 53.0,
|
52
|
+
"ratio": 58.241756
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"denominator": 46.0,
|
56
|
+
"name": "Conditional",
|
57
|
+
"numerator": 17.0,
|
58
|
+
"ratio": 36.95652
|
59
|
+
}
|
60
|
+
],
|
61
|
+
"name": "setup_parser.py"
|
62
|
+
}
|
63
|
+
],
|
64
|
+
"elements": [
|
65
|
+
{
|
66
|
+
"denominator": 2.0,
|
67
|
+
"name": "File",
|
68
|
+
"numerator": 1.0,
|
69
|
+
"ratio": 50.0
|
70
|
+
},
|
71
|
+
{
|
72
|
+
"denominator": 2.0,
|
73
|
+
"name": "Class",
|
74
|
+
"numerator": 1.0,
|
75
|
+
"ratio": 50.0
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"denominator": 126.0,
|
79
|
+
"name": "Line",
|
80
|
+
"numerator": 53.0,
|
81
|
+
"ratio": 42.06349
|
82
|
+
},
|
83
|
+
{
|
84
|
+
"denominator": 50.0,
|
85
|
+
"name": "Conditional",
|
86
|
+
"numerator": 17.0,
|
87
|
+
"ratio": 34.0
|
88
|
+
}
|
89
|
+
],
|
90
|
+
"name": "."
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"children": [
|
94
|
+
{
|
95
|
+
"children": [
|
96
|
+
{}
|
97
|
+
],
|
98
|
+
"elements": [
|
99
|
+
{
|
100
|
+
"denominator": 1.0,
|
101
|
+
"name": "Class",
|
102
|
+
"numerator": 1.0,
|
103
|
+
"ratio": 100.0
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"denominator": 18.0,
|
107
|
+
"name": "Line",
|
108
|
+
"numerator": 16.0,
|
109
|
+
"ratio": 88.888885
|
110
|
+
},
|
111
|
+
{
|
112
|
+
"denominator": 4.0,
|
113
|
+
"name": "Conditional",
|
114
|
+
"numerator": 4.0,
|
115
|
+
"ratio": 100.0
|
116
|
+
}
|
117
|
+
],
|
118
|
+
"name": "type_parser/base_type_parser.py"
|
119
|
+
},
|
120
|
+
{
|
121
|
+
"children": [
|
122
|
+
{}
|
123
|
+
],
|
124
|
+
"elements": [
|
125
|
+
{
|
126
|
+
"denominator": 1.0,
|
127
|
+
"name": "Class",
|
128
|
+
"numerator": 1.0,
|
129
|
+
"ratio": 100.0
|
130
|
+
},
|
131
|
+
{
|
132
|
+
"denominator": 27.0,
|
133
|
+
"name": "Line",
|
134
|
+
"numerator": 24.0,
|
135
|
+
"ratio": 88.888885
|
136
|
+
},
|
137
|
+
{
|
138
|
+
"denominator": 8.0,
|
139
|
+
"name": "Conditional",
|
140
|
+
"numerator": 7.0,
|
141
|
+
"ratio": 87.5
|
142
|
+
}
|
143
|
+
],
|
144
|
+
"name": "type_parser/base_type_parser_manager.py"
|
145
|
+
},
|
146
|
+
{
|
147
|
+
"children": [
|
148
|
+
{}
|
149
|
+
],
|
150
|
+
"elements": [
|
151
|
+
{
|
152
|
+
"denominator": 1.0,
|
153
|
+
"name": "Class",
|
154
|
+
"numerator": 1.0,
|
155
|
+
"ratio": 100.0
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"denominator": 7.0,
|
159
|
+
"name": "Line",
|
160
|
+
"numerator": 7.0,
|
161
|
+
"ratio": 100.0
|
162
|
+
}
|
163
|
+
],
|
164
|
+
"name": "type_parser/cpp_type_parser_manager.py"
|
165
|
+
},
|
166
|
+
{
|
167
|
+
"children": [
|
168
|
+
{}
|
169
|
+
],
|
170
|
+
"elements": [
|
171
|
+
{
|
172
|
+
"denominator": 1.0,
|
173
|
+
"name": "Class",
|
174
|
+
"numerator": 1.0,
|
175
|
+
"ratio": 100.0
|
176
|
+
},
|
177
|
+
{
|
178
|
+
"denominator": 20.0,
|
179
|
+
"name": "Line",
|
180
|
+
"numerator": 20.0,
|
181
|
+
"ratio": 100.0
|
182
|
+
}
|
183
|
+
],
|
184
|
+
"name": "type_parser/java_type_parser_manager.py"
|
185
|
+
},
|
186
|
+
{
|
187
|
+
"children": [
|
188
|
+
{}
|
189
|
+
],
|
190
|
+
"elements": [
|
191
|
+
{
|
192
|
+
"denominator": 1.0,
|
193
|
+
"name": "Class",
|
194
|
+
"numerator": 1.0,
|
195
|
+
"ratio": 100.0
|
196
|
+
},
|
197
|
+
{
|
198
|
+
"denominator": 21.0,
|
199
|
+
"name": "Line",
|
200
|
+
"numerator": 21.0,
|
201
|
+
"ratio": 100.0
|
202
|
+
}
|
203
|
+
],
|
204
|
+
"name": "type_parser/jni_type_parser_manager.py"
|
205
|
+
},
|
206
|
+
{
|
207
|
+
"children": [
|
208
|
+
{}
|
209
|
+
],
|
210
|
+
"elements": [
|
211
|
+
{
|
212
|
+
"denominator": 1.0,
|
213
|
+
"name": "Class",
|
214
|
+
"numerator": 1.0,
|
215
|
+
"ratio": 100.0
|
216
|
+
},
|
217
|
+
{
|
218
|
+
"denominator": 26.0,
|
219
|
+
"name": "Line",
|
220
|
+
"numerator": 26.0,
|
221
|
+
"ratio": 100.0
|
222
|
+
},
|
223
|
+
{
|
224
|
+
"denominator": 2.0,
|
225
|
+
"name": "Conditional",
|
226
|
+
"numerator": 2.0,
|
227
|
+
"ratio": 100.0
|
228
|
+
}
|
229
|
+
],
|
230
|
+
"name": "type_parser/objective_c_type_parser_manager.py"
|
231
|
+
},
|
232
|
+
{
|
233
|
+
"children": [
|
234
|
+
{}
|
235
|
+
],
|
236
|
+
"elements": [
|
237
|
+
{
|
238
|
+
"denominator": 1.0,
|
239
|
+
"name": "Class",
|
240
|
+
"numerator": 1.0,
|
241
|
+
"ratio": 100.0
|
242
|
+
},
|
243
|
+
{
|
244
|
+
"denominator": 21.0,
|
245
|
+
"name": "Line",
|
246
|
+
"numerator": 21.0,
|
247
|
+
"ratio": 100.0
|
248
|
+
},
|
249
|
+
{
|
250
|
+
"denominator": 2.0,
|
251
|
+
"name": "Conditional",
|
252
|
+
"numerator": 2.0,
|
253
|
+
"ratio": 100.0
|
254
|
+
}
|
255
|
+
],
|
256
|
+
"name": "type_parser/parser_matcher_util.py"
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"children": [
|
260
|
+
{}
|
261
|
+
],
|
262
|
+
"elements": [
|
263
|
+
{
|
264
|
+
"denominator": 1.0,
|
265
|
+
"name": "Class",
|
266
|
+
"numerator": 1.0,
|
267
|
+
"ratio": 100.0
|
268
|
+
},
|
269
|
+
{
|
270
|
+
"denominator": 35.0,
|
271
|
+
"name": "Line",
|
272
|
+
"numerator": 31.0,
|
273
|
+
"ratio": 88.57143
|
274
|
+
},
|
275
|
+
{
|
276
|
+
"denominator": 6.0,
|
277
|
+
"name": "Conditional",
|
278
|
+
"numerator": 3.0,
|
279
|
+
"ratio": 50.0
|
280
|
+
}
|
281
|
+
],
|
282
|
+
"name": "type_parser/signature_parser_manager.py"
|
283
|
+
}
|
284
|
+
],
|
285
|
+
"elements": [
|
286
|
+
{
|
287
|
+
"denominator": 8.0,
|
288
|
+
"name": "File",
|
289
|
+
"numerator": 8.0,
|
290
|
+
"ratio": 100.0
|
291
|
+
},
|
292
|
+
{
|
293
|
+
"denominator": 8.0,
|
294
|
+
"name": "Class",
|
295
|
+
"numerator": 8.0,
|
296
|
+
"ratio": 100.0
|
297
|
+
},
|
298
|
+
{
|
299
|
+
"denominator": 175.0,
|
300
|
+
"name": "Line",
|
301
|
+
"numerator": 166.0,
|
302
|
+
"ratio": 94.85714
|
303
|
+
},
|
304
|
+
{
|
305
|
+
"denominator": 22.0,
|
306
|
+
"name": "Conditional",
|
307
|
+
"numerator": 18.0,
|
308
|
+
"ratio": 81.818184
|
309
|
+
}
|
310
|
+
],
|
311
|
+
"name": "type_parser"
|
312
|
+
},
|
313
|
+
{
|
314
|
+
"children": [
|
315
|
+
{
|
316
|
+
"children": [
|
317
|
+
{}
|
318
|
+
],
|
319
|
+
"elements": [
|
320
|
+
{
|
321
|
+
"denominator": 1.0,
|
322
|
+
"name": "Class",
|
323
|
+
"numerator": 1.0,
|
324
|
+
"ratio": 100.0
|
325
|
+
},
|
326
|
+
{
|
327
|
+
"denominator": 11.0,
|
328
|
+
"name": "Line",
|
329
|
+
"numerator": 9.0,
|
330
|
+
"ratio": 81.818184
|
331
|
+
},
|
332
|
+
{
|
333
|
+
"denominator": 2.0,
|
334
|
+
"name": "Conditional",
|
335
|
+
"numerator": 1.0,
|
336
|
+
"ratio": 50.0
|
337
|
+
}
|
338
|
+
],
|
339
|
+
"name": "type_parser/java/char_vector_parser_java.py"
|
340
|
+
},
|
341
|
+
{
|
342
|
+
"children": [
|
343
|
+
{}
|
344
|
+
],
|
345
|
+
"elements": [
|
346
|
+
{
|
347
|
+
"denominator": 1.0,
|
348
|
+
"name": "Class",
|
349
|
+
"numerator": 1.0,
|
350
|
+
"ratio": 100.0
|
351
|
+
},
|
352
|
+
{
|
353
|
+
"denominator": 10.0,
|
354
|
+
"name": "Line",
|
355
|
+
"numerator": 10.0,
|
356
|
+
"ratio": 100.0
|
357
|
+
},
|
358
|
+
{
|
359
|
+
"denominator": 2.0,
|
360
|
+
"name": "Conditional",
|
361
|
+
"numerator": 2.0,
|
362
|
+
"ratio": 100.0
|
363
|
+
}
|
364
|
+
],
|
365
|
+
"name": "type_parser/java/date_parser_java.py"
|
366
|
+
}
|
367
|
+
],
|
368
|
+
"elements": [
|
369
|
+
{
|
370
|
+
"denominator": 9.0,
|
371
|
+
"name": "File",
|
372
|
+
"numerator": 9.0,
|
373
|
+
"ratio": 100.0
|
374
|
+
},
|
375
|
+
{
|
376
|
+
"denominator": 9.0,
|
377
|
+
"name": "Class",
|
378
|
+
"numerator": 9.0,
|
379
|
+
"ratio": 100.0
|
380
|
+
},
|
381
|
+
{
|
382
|
+
"denominator": 116.0,
|
383
|
+
"name": "Line",
|
384
|
+
"numerator": 110.0,
|
385
|
+
"ratio": 94.82758
|
386
|
+
},
|
387
|
+
{
|
388
|
+
"denominator": 26.0,
|
389
|
+
"name": "Conditional",
|
390
|
+
"numerator": 20.0,
|
391
|
+
"ratio": 76.92308
|
392
|
+
}
|
393
|
+
],
|
394
|
+
"name": "type_parser.java"
|
395
|
+
}
|
396
|
+
],
|
397
|
+
"elements": [
|
398
|
+
{
|
399
|
+
"denominator": 22.0,
|
400
|
+
"name": "Package",
|
401
|
+
"numerator": 22.0,
|
402
|
+
"ratio": 100.0
|
403
|
+
},
|
404
|
+
{
|
405
|
+
"denominator": 133.0,
|
406
|
+
"name": "File",
|
407
|
+
"numerator": 130.0,
|
408
|
+
"ratio": 97.74436
|
409
|
+
},
|
410
|
+
{
|
411
|
+
"denominator": 133.0,
|
412
|
+
"name": "Class",
|
413
|
+
"numerator": 130.0,
|
414
|
+
"ratio": 97.74436
|
415
|
+
},
|
416
|
+
{
|
417
|
+
"denominator": 5555.0,
|
418
|
+
"name": "Line",
|
419
|
+
"numerator": 4557.0,
|
420
|
+
"ratio": 82.0342
|
421
|
+
},
|
422
|
+
{
|
423
|
+
"denominator": 1068.0,
|
424
|
+
"name": "Conditional",
|
425
|
+
"numerator": 684.0,
|
426
|
+
"ratio": 64.044945
|
427
|
+
}
|
428
|
+
],
|
429
|
+
"name": "project"
|
430
|
+
}
|
431
|
+
],
|
432
|
+
"elements": [
|
433
|
+
{
|
434
|
+
"denominator": 1.0,
|
435
|
+
"name": "Group",
|
436
|
+
"numerator": 1.0,
|
437
|
+
"ratio": 100.0
|
438
|
+
},
|
439
|
+
{
|
440
|
+
"denominator": 22.0,
|
441
|
+
"name": "Package",
|
442
|
+
"numerator": 22.0,
|
443
|
+
"ratio": 100.0
|
444
|
+
},
|
445
|
+
{
|
446
|
+
"denominator": 133.0,
|
447
|
+
"name": "File",
|
448
|
+
"numerator": 130.0,
|
449
|
+
"ratio": 97.74436
|
450
|
+
},
|
451
|
+
{
|
452
|
+
"denominator": 133.0,
|
453
|
+
"name": "Class",
|
454
|
+
"numerator": 130.0,
|
455
|
+
"ratio": 97.74436
|
456
|
+
},
|
457
|
+
{
|
458
|
+
"denominator": 5555.0,
|
459
|
+
"name": "Line",
|
460
|
+
"numerator": 4557.0,
|
461
|
+
"ratio": 82.0342
|
462
|
+
},
|
463
|
+
{
|
464
|
+
"denominator": 1068.0,
|
465
|
+
"name": "Conditional",
|
466
|
+
"numerator": 684.0,
|
467
|
+
"ratio": 64.044945
|
468
|
+
}
|
469
|
+
],
|
470
|
+
"name": "cobertura: coverage.xml"
|
471
|
+
}
|
472
|
+
],
|
473
|
+
"elements": [
|
474
|
+
{
|
475
|
+
"denominator": 1.0,
|
476
|
+
"name": "Report",
|
477
|
+
"numerator": 1.0,
|
478
|
+
"ratio": 100.0
|
479
|
+
},
|
480
|
+
{
|
481
|
+
"denominator": 1.0,
|
482
|
+
"name": "Group",
|
483
|
+
"numerator": 1.0,
|
484
|
+
"ratio": 100.0
|
485
|
+
},
|
486
|
+
{
|
487
|
+
"denominator": 22.0,
|
488
|
+
"name": "Package",
|
489
|
+
"numerator": 22.0,
|
490
|
+
"ratio": 100.0
|
491
|
+
},
|
492
|
+
{
|
493
|
+
"denominator": 133.0,
|
494
|
+
"name": "File",
|
495
|
+
"numerator": 130.0,
|
496
|
+
"ratio": 97.74436
|
497
|
+
},
|
498
|
+
{
|
499
|
+
"denominator": 133.0,
|
500
|
+
"name": "Class",
|
501
|
+
"numerator": 130.0,
|
502
|
+
"ratio": 97.74436
|
503
|
+
},
|
504
|
+
{
|
505
|
+
"denominator": 5555.0,
|
506
|
+
"name": "Line",
|
507
|
+
"numerator": 4557.0,
|
508
|
+
"ratio": 82.0342
|
509
|
+
},
|
510
|
+
{
|
511
|
+
"denominator": 1068.0,
|
512
|
+
"name": "Conditional",
|
513
|
+
"numerator": 684.0,
|
514
|
+
"ratio": 64.044945
|
515
|
+
}
|
516
|
+
],
|
517
|
+
"name": "All reports"
|
518
|
+
}
|
519
|
+
}
|