simplecov 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +165 -57
  3. data/exe/simplecov +0 -3
  4. data/lib/minitest/simplecov_plugin.rb +12 -9
  5. data/lib/simplecov/atomic_file.rb +16 -19
  6. data/lib/simplecov/autostart.rb +5 -7
  7. data/lib/simplecov/baseline/parser.rb +58 -0
  8. data/lib/simplecov/baseline.rb +170 -0
  9. data/lib/simplecov/cli/affected/changed_files.rb +57 -0
  10. data/lib/simplecov/cli/affected/selection.rb +117 -0
  11. data/lib/simplecov/cli/affected.rb +148 -0
  12. data/lib/simplecov/cli/badge/svg.rb +70 -0
  13. data/lib/simplecov/cli/badge.rb +62 -0
  14. data/lib/simplecov/cli/clean.rb +23 -24
  15. data/lib/simplecov/cli/command_helpers.rb +55 -19
  16. data/lib/simplecov/cli/completions/scripts.rb +114 -0
  17. data/lib/simplecov/cli/completions.rb +83 -0
  18. data/lib/simplecov/cli/coverage.rb +25 -28
  19. data/lib/simplecov/cli/coverage_file.rb +58 -14
  20. data/lib/simplecov/cli/dead_code/output.rb +100 -0
  21. data/lib/simplecov/cli/dead_code.rb +139 -0
  22. data/lib/simplecov/cli/diff/output.rb +45 -0
  23. data/lib/simplecov/cli/diff.rb +35 -67
  24. data/lib/simplecov/cli/dotfile.rb +83 -38
  25. data/lib/simplecov/cli/git.rb +41 -0
  26. data/lib/simplecov/cli/history/output.rb +135 -0
  27. data/lib/simplecov/cli/history.rb +67 -0
  28. data/lib/simplecov/cli/merge.rb +34 -39
  29. data/lib/simplecov/cli/open.rb +12 -15
  30. data/lib/simplecov/cli/patch/changed_lines.rb +149 -0
  31. data/lib/simplecov/cli/patch/output.rb +135 -0
  32. data/lib/simplecov/cli/patch.rb +169 -0
  33. data/lib/simplecov/cli/ratchet/output.rb +44 -0
  34. data/lib/simplecov/cli/ratchet.rb +83 -0
  35. data/lib/simplecov/cli/report.rb +18 -24
  36. data/lib/simplecov/cli/run.rb +8 -9
  37. data/lib/simplecov/cli/serve/report_preparer.rb +7 -6
  38. data/lib/simplecov/cli/serve/static_file_handler.rb +62 -56
  39. data/lib/simplecov/cli/serve.rb +27 -24
  40. data/lib/simplecov/cli/show/annotator.rb +87 -0
  41. data/lib/simplecov/cli/show/sweep.rb +36 -0
  42. data/lib/simplecov/cli/show.rb +133 -0
  43. data/lib/simplecov/cli/status/facts.rb +87 -0
  44. data/lib/simplecov/cli/status.rb +93 -0
  45. data/lib/simplecov/cli/tests/redundancy.rb +78 -0
  46. data/lib/simplecov/cli/tests.rb +148 -0
  47. data/lib/simplecov/cli/uncovered/misses.rb +37 -0
  48. data/lib/simplecov/cli/uncovered.rb +70 -32
  49. data/lib/simplecov/cli/usage.rb +152 -0
  50. data/lib/simplecov/cli/watch/live_report.rb +73 -0
  51. data/lib/simplecov/cli/watch/narrator.rb +55 -0
  52. data/lib/simplecov/cli/watch/poller.rb +45 -0
  53. data/lib/simplecov/cli/watch/session.rb +134 -0
  54. data/lib/simplecov/cli/watch/test_plan.rb +43 -0
  55. data/lib/simplecov/cli/watch.rb +85 -0
  56. data/lib/simplecov/cli.rb +43 -92
  57. data/lib/simplecov/color.rb +21 -35
  58. data/lib/simplecov/combine/branches_combiner.rb +7 -31
  59. data/lib/simplecov/combine/coverage_accumulator.rb +49 -142
  60. data/lib/simplecov/combine/identity_interner.rb +10 -13
  61. data/lib/simplecov/combine/interned_counts.rb +7 -9
  62. data/lib/simplecov/combine/lines_combiner.rb +20 -44
  63. data/lib/simplecov/combine/methods_combiner.rb +9 -35
  64. data/lib/simplecov/combine/results_combiner.rb +4 -21
  65. data/lib/simplecov/combine.rb +0 -6
  66. data/lib/simplecov/command_guesser.rb +20 -34
  67. data/lib/simplecov/configuration/baseline.rb +31 -0
  68. data/lib/simplecov/configuration/coverage.rb +91 -79
  69. data/lib/simplecov/configuration/coverage_criteria.rb +43 -54
  70. data/lib/simplecov/configuration/deprecations.rb +21 -0
  71. data/lib/simplecov/configuration/eval_coverage.rb +6 -10
  72. data/lib/simplecov/configuration/filters.rb +40 -73
  73. data/lib/simplecov/configuration/formatting.rb +74 -83
  74. data/lib/simplecov/configuration/groups.rb +19 -13
  75. data/lib/simplecov/configuration/history.rb +44 -0
  76. data/lib/simplecov/configuration/ignored_entries.rb +31 -22
  77. data/lib/simplecov/configuration/merging.rb +94 -62
  78. data/lib/simplecov/configuration/missed_caps.rb +51 -0
  79. data/lib/simplecov/configuration/production.rb +23 -0
  80. data/lib/simplecov/configuration/test_tracking.rb +48 -0
  81. data/lib/simplecov/configuration/thresholds.rb +33 -62
  82. data/lib/simplecov/configuration/view_coverage.rb +38 -0
  83. data/lib/simplecov/configuration.rb +70 -76
  84. data/lib/simplecov/configuration_error.rb +5 -0
  85. data/lib/simplecov/context_map/union.rb +81 -0
  86. data/lib/simplecov/context_map.rb +187 -0
  87. data/lib/simplecov/coverage_json.rb +2 -5
  88. data/lib/simplecov/coverage_statistics.rb +14 -24
  89. data/lib/simplecov/coverage_violations.rb +157 -64
  90. data/lib/simplecov/current_run.rb +61 -0
  91. data/lib/simplecov/defaults.rb +4 -23
  92. data/lib/simplecov/deprecation.rb +45 -27
  93. data/lib/simplecov/directive.rb +46 -62
  94. data/lib/simplecov/exit_codes/baseline_check.rb +46 -0
  95. data/lib/simplecov/exit_codes/check.rb +17 -11
  96. data/lib/simplecov/exit_codes/exit_code_handling.rb +21 -8
  97. data/lib/simplecov/exit_codes/maximum_coverage_drop_check.rb +7 -10
  98. data/lib/simplecov/exit_codes/maximum_missed_check.rb +26 -0
  99. data/lib/simplecov/exit_codes/maximum_missed_per_file_check.rb +34 -0
  100. data/lib/simplecov/exit_codes/maximum_overall_coverage_check.rb +7 -12
  101. data/lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb +11 -10
  102. data/lib/simplecov/exit_codes/minimum_coverage_by_group_check.rb +7 -9
  103. data/lib/simplecov/exit_codes/minimum_overall_coverage_check.rb +16 -17
  104. data/lib/simplecov/exit_codes.rb +17 -7
  105. data/lib/simplecov/exit_handling.rb +94 -59
  106. data/lib/simplecov/file_list.rb +20 -51
  107. data/lib/simplecov/filter.rb +43 -66
  108. data/lib/simplecov/formatter/base.rb +38 -51
  109. data/lib/simplecov/formatter/baseline_formatter.rb +98 -0
  110. data/lib/simplecov/formatter/coverage_json_writer.rb +29 -31
  111. data/lib/simplecov/formatter/html_formatter/public/index.html +17 -10
  112. data/lib/simplecov/formatter/html_formatter/viewer_data_validator.rb +74 -17
  113. data/lib/simplecov/formatter/html_formatter.rb +24 -41
  114. data/lib/simplecov/formatter/json_formatter/errors_formatter.rb +50 -16
  115. data/lib/simplecov/formatter/json_formatter/production_section_formatter.rb +48 -0
  116. data/lib/simplecov/formatter/json_formatter/result_hash_formatter.rb +43 -29
  117. data/lib/simplecov/formatter/json_formatter/source_file_formatter.rb +14 -10
  118. data/lib/simplecov/formatter/json_formatter.rb +7 -13
  119. data/lib/simplecov/formatter/multi_formatter.rb +5 -11
  120. data/lib/simplecov/formatter/simple_formatter.rb +2 -8
  121. data/lib/simplecov/formatter.rb +14 -10
  122. data/lib/simplecov/group_names.rb +13 -12
  123. data/lib/simplecov/history.rb +115 -0
  124. data/lib/simplecov/last_run.rb +6 -9
  125. data/lib/simplecov/lines_classifier.rb +31 -16
  126. data/lib/simplecov/load_global_config.rb +7 -7
  127. data/lib/simplecov/parallel_adapters/base.rb +13 -41
  128. data/lib/simplecov/parallel_adapters/generic.rb +7 -18
  129. data/lib/simplecov/parallel_adapters/parallel_tests.rb +21 -42
  130. data/lib/simplecov/parallel_adapters.rb +24 -53
  131. data/lib/simplecov/parallel_coordination.rb +39 -49
  132. data/lib/simplecov/parallel_result_merger/worker_payload.rb +33 -0
  133. data/lib/simplecov/parallel_result_merger.rb +67 -126
  134. data/lib/simplecov/process.rb +14 -32
  135. data/lib/simplecov/production/error.rb +11 -0
  136. data/lib/simplecov/production/file_sink.rb +130 -0
  137. data/lib/simplecov/production.rb +249 -0
  138. data/lib/simplecov/profiles/rails.rb +1 -12
  139. data/lib/simplecov/profiles/root_filter.rb +0 -4
  140. data/lib/simplecov/profiles/strict.rb +9 -19
  141. data/lib/simplecov/profiles.rb +11 -33
  142. data/lib/simplecov/report_deferral.rb +11 -15
  143. data/lib/simplecov/report_stamp.rb +6 -9
  144. data/lib/simplecov/result/filter_config.rb +19 -0
  145. data/lib/simplecov/result/missing_source_files_reporter.rb +8 -9
  146. data/lib/simplecov/result/serialization.rb +43 -0
  147. data/lib/simplecov/result/source_file_builder.rb +7 -12
  148. data/lib/simplecov/result.rb +68 -117
  149. data/lib/simplecov/result_adapter.rb +58 -68
  150. data/lib/simplecov/result_merger/contexts.rb +22 -0
  151. data/lib/simplecov/result_merger/legacy_format_adapter.rb +4 -8
  152. data/lib/simplecov/result_merger/resultset_file.rb +20 -27
  153. data/lib/simplecov/result_merger/resultset_run_identity.rb +23 -25
  154. data/lib/simplecov/result_merger/resultset_store.rb +23 -14
  155. data/lib/simplecov/result_merger/unloaded_files.rb +24 -32
  156. data/lib/simplecov/result_merger.rb +59 -58
  157. data/lib/simplecov/result_processing.rb +74 -119
  158. data/lib/simplecov/run_identity.rb +16 -18
  159. data/lib/simplecov/simulate_coverage.rb +35 -50
  160. data/lib/simplecov/source_file/branch.rb +8 -33
  161. data/lib/simplecov/source_file/branch_builder.rb +28 -47
  162. data/lib/simplecov/source_file/builder_context.rb +6 -13
  163. data/lib/simplecov/source_file/line.rb +13 -33
  164. data/lib/simplecov/source_file/line_builder.rb +9 -15
  165. data/lib/simplecov/source_file/method.rb +3 -7
  166. data/lib/simplecov/source_file/method_builder.rb +6 -15
  167. data/lib/simplecov/source_file/ruby_data_parser.rb +59 -66
  168. data/lib/simplecov/source_file/skip_chunks.rb +19 -28
  169. data/lib/simplecov/source_file/source_loader.rb +45 -35
  170. data/lib/simplecov/source_file/statistics.rb +10 -9
  171. data/lib/simplecov/source_file.rb +21 -51
  172. data/lib/simplecov/static_coverage_extractor/condition_folding.rb +63 -114
  173. data/lib/simplecov/static_coverage_extractor/location_conventions.rb +76 -121
  174. data/lib/simplecov/static_coverage_extractor/method_collector.rb +11 -24
  175. data/lib/simplecov/static_coverage_extractor/prism_compat.rb +15 -24
  176. data/lib/simplecov/static_coverage_extractor/value_position.rb +25 -38
  177. data/lib/simplecov/static_coverage_extractor/visitor.rb +47 -64
  178. data/lib/simplecov/static_coverage_extractor.rb +46 -62
  179. data/lib/simplecov/test_tracker/accessors.rb +34 -0
  180. data/lib/simplecov/test_tracker/constant_watch.rb +49 -0
  181. data/lib/simplecov/test_tracker/delta.rb +69 -0
  182. data/lib/simplecov/test_tracker/framework_hooks.rb +130 -0
  183. data/lib/simplecov/test_tracker.rb +162 -0
  184. data/lib/simplecov/unloaded_file_injector.rb +18 -31
  185. data/lib/simplecov/useless_results_remover.rb +7 -6
  186. data/lib/simplecov/version.rb +1 -1
  187. data/lib/simplecov/view_coverage/template_compiler.rb +83 -0
  188. data/lib/simplecov/view_coverage.rb +55 -0
  189. data/lib/simplecov-html.rb +1 -0
  190. data/lib/simplecov.rb +59 -114
  191. data/lib/simplecov_json_formatter.rb +1 -0
  192. data/man/simplecov.1 +349 -0
  193. data/sig/simplecov.rbs +523 -595
  194. metadata +72 -7
  195. data/schemas/coverage-v1.0.schema.json +0 -306
  196. data/schemas/coverage.schema.json +0 -306
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplecov
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Berlin
@@ -38,21 +38,56 @@ files:
38
38
  - lib/simplecov.rb
39
39
  - lib/simplecov/atomic_file.rb
40
40
  - lib/simplecov/autostart.rb
41
+ - lib/simplecov/baseline.rb
42
+ - lib/simplecov/baseline/parser.rb
41
43
  - lib/simplecov/cli.rb
44
+ - lib/simplecov/cli/affected.rb
45
+ - lib/simplecov/cli/affected/changed_files.rb
46
+ - lib/simplecov/cli/affected/selection.rb
47
+ - lib/simplecov/cli/badge.rb
48
+ - lib/simplecov/cli/badge/svg.rb
42
49
  - lib/simplecov/cli/clean.rb
43
50
  - lib/simplecov/cli/command_helpers.rb
51
+ - lib/simplecov/cli/completions.rb
52
+ - lib/simplecov/cli/completions/scripts.rb
44
53
  - lib/simplecov/cli/coverage.rb
45
54
  - lib/simplecov/cli/coverage_file.rb
55
+ - lib/simplecov/cli/dead_code.rb
56
+ - lib/simplecov/cli/dead_code/output.rb
46
57
  - lib/simplecov/cli/diff.rb
58
+ - lib/simplecov/cli/diff/output.rb
47
59
  - lib/simplecov/cli/dotfile.rb
60
+ - lib/simplecov/cli/git.rb
61
+ - lib/simplecov/cli/history.rb
62
+ - lib/simplecov/cli/history/output.rb
48
63
  - lib/simplecov/cli/merge.rb
49
64
  - lib/simplecov/cli/open.rb
65
+ - lib/simplecov/cli/patch.rb
66
+ - lib/simplecov/cli/patch/changed_lines.rb
67
+ - lib/simplecov/cli/patch/output.rb
68
+ - lib/simplecov/cli/ratchet.rb
69
+ - lib/simplecov/cli/ratchet/output.rb
50
70
  - lib/simplecov/cli/report.rb
51
71
  - lib/simplecov/cli/run.rb
52
72
  - lib/simplecov/cli/serve.rb
53
73
  - lib/simplecov/cli/serve/report_preparer.rb
54
74
  - lib/simplecov/cli/serve/static_file_handler.rb
75
+ - lib/simplecov/cli/show.rb
76
+ - lib/simplecov/cli/show/annotator.rb
77
+ - lib/simplecov/cli/show/sweep.rb
78
+ - lib/simplecov/cli/status.rb
79
+ - lib/simplecov/cli/status/facts.rb
80
+ - lib/simplecov/cli/tests.rb
81
+ - lib/simplecov/cli/tests/redundancy.rb
55
82
  - lib/simplecov/cli/uncovered.rb
83
+ - lib/simplecov/cli/uncovered/misses.rb
84
+ - lib/simplecov/cli/usage.rb
85
+ - lib/simplecov/cli/watch.rb
86
+ - lib/simplecov/cli/watch/live_report.rb
87
+ - lib/simplecov/cli/watch/narrator.rb
88
+ - lib/simplecov/cli/watch/poller.rb
89
+ - lib/simplecov/cli/watch/session.rb
90
+ - lib/simplecov/cli/watch/test_plan.rb
56
91
  - lib/simplecov/color.rb
57
92
  - lib/simplecov/combine.rb
58
93
  - lib/simplecov/combine/branches_combiner.rb
@@ -64,25 +99,39 @@ files:
64
99
  - lib/simplecov/combine/results_combiner.rb
65
100
  - lib/simplecov/command_guesser.rb
66
101
  - lib/simplecov/configuration.rb
102
+ - lib/simplecov/configuration/baseline.rb
67
103
  - lib/simplecov/configuration/coverage.rb
68
104
  - lib/simplecov/configuration/coverage_criteria.rb
105
+ - lib/simplecov/configuration/deprecations.rb
69
106
  - lib/simplecov/configuration/eval_coverage.rb
70
107
  - lib/simplecov/configuration/filters.rb
71
108
  - lib/simplecov/configuration/formatting.rb
72
109
  - lib/simplecov/configuration/groups.rb
110
+ - lib/simplecov/configuration/history.rb
73
111
  - lib/simplecov/configuration/ignored_entries.rb
74
112
  - lib/simplecov/configuration/merging.rb
113
+ - lib/simplecov/configuration/missed_caps.rb
114
+ - lib/simplecov/configuration/production.rb
115
+ - lib/simplecov/configuration/test_tracking.rb
75
116
  - lib/simplecov/configuration/thresholds.rb
117
+ - lib/simplecov/configuration/view_coverage.rb
118
+ - lib/simplecov/configuration_error.rb
119
+ - lib/simplecov/context_map.rb
120
+ - lib/simplecov/context_map/union.rb
76
121
  - lib/simplecov/coverage_json.rb
77
122
  - lib/simplecov/coverage_statistics.rb
78
123
  - lib/simplecov/coverage_violations.rb
124
+ - lib/simplecov/current_run.rb
79
125
  - lib/simplecov/defaults.rb
80
126
  - lib/simplecov/deprecation.rb
81
127
  - lib/simplecov/directive.rb
82
128
  - lib/simplecov/exit_codes.rb
129
+ - lib/simplecov/exit_codes/baseline_check.rb
83
130
  - lib/simplecov/exit_codes/check.rb
84
131
  - lib/simplecov/exit_codes/exit_code_handling.rb
85
132
  - lib/simplecov/exit_codes/maximum_coverage_drop_check.rb
133
+ - lib/simplecov/exit_codes/maximum_missed_check.rb
134
+ - lib/simplecov/exit_codes/maximum_missed_per_file_check.rb
86
135
  - lib/simplecov/exit_codes/maximum_overall_coverage_check.rb
87
136
  - lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb
88
137
  - lib/simplecov/exit_codes/minimum_coverage_by_group_check.rb
@@ -92,17 +141,20 @@ files:
92
141
  - lib/simplecov/filter.rb
93
142
  - lib/simplecov/formatter.rb
94
143
  - lib/simplecov/formatter/base.rb
144
+ - lib/simplecov/formatter/baseline_formatter.rb
95
145
  - lib/simplecov/formatter/coverage_json_writer.rb
96
146
  - lib/simplecov/formatter/html_formatter.rb
97
147
  - lib/simplecov/formatter/html_formatter/public/index.html
98
148
  - lib/simplecov/formatter/html_formatter/viewer_data_validator.rb
99
149
  - lib/simplecov/formatter/json_formatter.rb
100
150
  - lib/simplecov/formatter/json_formatter/errors_formatter.rb
151
+ - lib/simplecov/formatter/json_formatter/production_section_formatter.rb
101
152
  - lib/simplecov/formatter/json_formatter/result_hash_formatter.rb
102
153
  - lib/simplecov/formatter/json_formatter/source_file_formatter.rb
103
154
  - lib/simplecov/formatter/multi_formatter.rb
104
155
  - lib/simplecov/formatter/simple_formatter.rb
105
156
  - lib/simplecov/group_names.rb
157
+ - lib/simplecov/history.rb
106
158
  - lib/simplecov/last_run.rb
107
159
  - lib/simplecov/lines_classifier.rb
108
160
  - lib/simplecov/load_global_config.rb
@@ -113,7 +165,11 @@ files:
113
165
  - lib/simplecov/parallel_adapters/parallel_tests.rb
114
166
  - lib/simplecov/parallel_coordination.rb
115
167
  - lib/simplecov/parallel_result_merger.rb
168
+ - lib/simplecov/parallel_result_merger/worker_payload.rb
116
169
  - lib/simplecov/process.rb
170
+ - lib/simplecov/production.rb
171
+ - lib/simplecov/production/error.rb
172
+ - lib/simplecov/production/file_sink.rb
117
173
  - lib/simplecov/profiles.rb
118
174
  - lib/simplecov/profiles/bundler_filter.rb
119
175
  - lib/simplecov/profiles/hidden_filter.rb
@@ -124,10 +180,13 @@ files:
124
180
  - lib/simplecov/report_deferral.rb
125
181
  - lib/simplecov/report_stamp.rb
126
182
  - lib/simplecov/result.rb
183
+ - lib/simplecov/result/filter_config.rb
127
184
  - lib/simplecov/result/missing_source_files_reporter.rb
185
+ - lib/simplecov/result/serialization.rb
128
186
  - lib/simplecov/result/source_file_builder.rb
129
187
  - lib/simplecov/result_adapter.rb
130
188
  - lib/simplecov/result_merger.rb
189
+ - lib/simplecov/result_merger/contexts.rb
131
190
  - lib/simplecov/result_merger/legacy_format_adapter.rb
132
191
  - lib/simplecov/result_merger/resultset_file.rb
133
192
  - lib/simplecov/result_merger/resultset_run_identity.rb
@@ -155,22 +214,28 @@ files:
155
214
  - lib/simplecov/static_coverage_extractor/prism_compat.rb
156
215
  - lib/simplecov/static_coverage_extractor/value_position.rb
157
216
  - lib/simplecov/static_coverage_extractor/visitor.rb
217
+ - lib/simplecov/test_tracker.rb
218
+ - lib/simplecov/test_tracker/accessors.rb
219
+ - lib/simplecov/test_tracker/constant_watch.rb
220
+ - lib/simplecov/test_tracker/delta.rb
221
+ - lib/simplecov/test_tracker/framework_hooks.rb
158
222
  - lib/simplecov/unloaded_file_injector.rb
159
223
  - lib/simplecov/useless_results_remover.rb
160
224
  - lib/simplecov/version.rb
225
+ - lib/simplecov/view_coverage.rb
226
+ - lib/simplecov/view_coverage/template_compiler.rb
161
227
  - lib/simplecov_json_formatter.rb
162
- - schemas/coverage-v1.0.schema.json
163
- - schemas/coverage.schema.json
228
+ - man/simplecov.1
164
229
  - sig/simplecov.rbs
165
230
  homepage: https://github.com/simplecov-ruby/simplecov
166
231
  licenses:
167
232
  - MIT
168
233
  metadata:
169
234
  bug_tracker_uri: https://github.com/simplecov-ruby/simplecov/issues
170
- changelog_uri: https://github.com/simplecov-ruby/simplecov/blob/main/docs/Changelog.md
171
- documentation_uri: https://www.rubydoc.info/gems/simplecov/1.1.0
235
+ changelog_uri: https://github.com/simplecov-ruby/simplecov/blob/main/CHANGELOG.md
236
+ documentation_uri: https://www.rubydoc.info/gems/simplecov/1.2.0
172
237
  mailing_list_uri: https://groups.google.com/forum/#!forum/simplecov
173
- source_code_uri: https://github.com/simplecov-ruby/simplecov/tree/v1.1.0
238
+ source_code_uri: https://github.com/simplecov-ruby/simplecov/tree/v1.2.0
174
239
  rubygems_mfa_required: 'true'
175
240
  rdoc_options: []
176
241
  require_paths:
@@ -186,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
251
  - !ruby/object:Gem::Version
187
252
  version: '0'
188
253
  requirements: []
189
- rubygems_version: 4.0.18
254
+ rubygems_version: 4.0.20
190
255
  specification_version: 4
191
256
  summary: Code coverage for Ruby
192
257
  test_files: []
@@ -1,306 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://raw.githubusercontent.com/simplecov-ruby/simplecov/main/schemas/coverage-v1.0.schema.json",
4
- "title": "SimpleCov coverage.json",
5
- "description": "Schema for the coverage.json file emitted by SimpleCov's JSONFormatter. Versioned independently of the gem. Non-breaking additions bump the minor segment of schema_version, breaking changes bump the major segment. The versioned file at schemas/coverage-vX.Y.schema.json is the canonical artifact for that version, schemas/coverage.schema.json is a convenience alias for the latest.",
6
- "type": "object",
7
- "required": ["$schema", "meta", "total", "coverage", "groups", "errors"],
8
- "additionalProperties": false,
9
- "properties": {
10
- "$schema": {
11
- "type": "string",
12
- "format": "uri",
13
- "description": "URL of the JSON Schema this document conforms to. Pinned to the versioned canonical URL so documents stay validatable against the exact contract they were emitted under, even after the schema evolves."
14
- },
15
- "meta": {
16
- "type": "object",
17
- "required": [
18
- "schema_version",
19
- "simplecov_version",
20
- "command_name",
21
- "project_name",
22
- "timestamp",
23
- "root",
24
- "commit",
25
- "primary_coverage",
26
- "line_coverage",
27
- "branch_coverage",
28
- "method_coverage"
29
- ],
30
- "additionalProperties": false,
31
- "properties": {
32
- "schema_version": {
33
- "type": "string",
34
- "const": "1.0",
35
- "description": "Schema major.minor. Additive changes bump minor; breaking changes bump major. Update this `const` whenever the schema version is bumped so documents claiming a different version don't quietly validate against this contract."
36
- },
37
- "simplecov_version": {
38
- "type": "string",
39
- "description": "The version of the SimpleCov gem that produced this file."
40
- },
41
- "command_name": {"type": "string"},
42
- "project_name": {"type": "string"},
43
- "timestamp": {
44
- "type": "string",
45
- "format": "date-time",
46
- "description": "ISO 8601 timestamp with millisecond precision."
47
- },
48
- "root": {
49
- "type": "string",
50
- "description": "Absolute path to SimpleCov.root at the time of write."
51
- },
52
- "commit": {
53
- "type": ["string", "null"],
54
- "description": "Full git commit SHA of `root`'s HEAD when the report was generated, or null when the project isn't a git checkout (or git isn't available). Lets tools recover the exact source a report reflects, which matters most when `source_in_json` is false and the per-file `source` arrays are omitted."
55
- },
56
- "primary_coverage": {
57
- "type": "string",
58
- "enum": ["line", "branch", "method"],
59
- "description": "The coverage criterion `SimpleCov.primary_coverage` names as primary. The HTML report sorts file lists by this criterion's coverage by default."
60
- },
61
- "line_coverage": {"type": "boolean"},
62
- "branch_coverage": {"type": "boolean"},
63
- "method_coverage": {"type": "boolean"}
64
- }
65
- },
66
- "total": {"$ref": "#/definitions/totals"},
67
- "coverage": {
68
- "type": "object",
69
- "description": "Map of project-relative file paths to per-file coverage data.",
70
- "additionalProperties": {"$ref": "#/definitions/source_file"}
71
- },
72
- "groups": {
73
- "type": "object",
74
- "description": "Map of group names to per-group totals plus the list of files in the group.",
75
- "additionalProperties": {"$ref": "#/definitions/group"}
76
- },
77
- "errors": {
78
- "type": "object",
79
- "description": "Threshold violations from minimum_coverage, minimum_coverage_by_file, minimum_coverage_by_group, maximum_coverage, and maximum_coverage_drop. Empty object when no thresholds were violated.",
80
- "additionalProperties": false,
81
- "properties": {
82
- "minimum_coverage": {
83
- "type": "object",
84
- "description": "Keyed by criterion: lines, branches, methods.",
85
- "additionalProperties": {"$ref": "#/definitions/expected_actual"}
86
- },
87
- "minimum_coverage_by_file": {
88
- "type": "object",
89
- "description": "Keyed by project-relative filename, then by criterion (lines, branches, methods).",
90
- "additionalProperties": {
91
- "type": "object",
92
- "additionalProperties": {"$ref": "#/definitions/expected_actual"}
93
- }
94
- },
95
- "minimum_coverage_by_group": {
96
- "type": "object",
97
- "description": "Keyed by group name, then by criterion (lines, branches, methods).",
98
- "additionalProperties": {
99
- "type": "object",
100
- "additionalProperties": {"$ref": "#/definitions/expected_actual"}
101
- }
102
- },
103
- "maximum_coverage": {
104
- "type": "object",
105
- "description": "Keyed by criterion: lines, branches, methods. `expected` is the configured maximum, `actual` is the measured value that exceeded it.",
106
- "additionalProperties": {"$ref": "#/definitions/expected_actual"}
107
- },
108
- "maximum_coverage_drop": {
109
- "type": "object",
110
- "description": "Keyed by criterion: lines, branches, methods.",
111
- "additionalProperties": {"$ref": "#/definitions/maximum_actual"}
112
- }
113
- }
114
- }
115
- },
116
- "definitions": {
117
- "totals": {
118
- "type": "object",
119
- "additionalProperties": false,
120
- "anyOf": [
121
- {"required": ["lines"]},
122
- {"required": ["branches"]},
123
- {"required": ["methods"]}
124
- ],
125
- "properties": {
126
- "lines": {"$ref": "#/definitions/line_statistic"},
127
- "branches": {"$ref": "#/definitions/coverage_statistic"},
128
- "methods": {"$ref": "#/definitions/coverage_statistic"}
129
- }
130
- },
131
- "source_file": {
132
- "type": "object",
133
- "additionalProperties": false,
134
- "anyOf": [
135
- {"required": ["lines"]},
136
- {"required": ["branches"]},
137
- {"required": ["methods"]}
138
- ],
139
- "dependentRequired": {
140
- "lines": ["lines_covered_percent", "covered_lines", "missed_lines", "omitted_lines", "total_lines"],
141
- "lines_covered_percent": ["lines", "covered_lines", "missed_lines", "omitted_lines", "total_lines"],
142
- "covered_lines": ["lines", "lines_covered_percent", "missed_lines", "omitted_lines", "total_lines"],
143
- "missed_lines": ["lines", "lines_covered_percent", "covered_lines", "omitted_lines", "total_lines"],
144
- "omitted_lines": ["lines", "lines_covered_percent", "covered_lines", "missed_lines", "total_lines"],
145
- "total_lines": ["lines", "lines_covered_percent", "covered_lines", "missed_lines", "omitted_lines"],
146
- "branches": ["branches_covered_percent", "covered_branches", "missed_branches", "total_branches"],
147
- "branches_covered_percent": ["branches", "covered_branches", "missed_branches", "total_branches"],
148
- "covered_branches": ["branches", "branches_covered_percent", "missed_branches", "total_branches"],
149
- "missed_branches": ["branches", "branches_covered_percent", "covered_branches", "total_branches"],
150
- "total_branches": ["branches", "branches_covered_percent", "covered_branches", "missed_branches"],
151
- "methods": ["methods_covered_percent", "covered_methods", "missed_methods", "total_methods"],
152
- "methods_covered_percent": ["methods", "covered_methods", "missed_methods", "total_methods"],
153
- "covered_methods": ["methods", "methods_covered_percent", "missed_methods", "total_methods"],
154
- "missed_methods": ["methods", "methods_covered_percent", "covered_methods", "total_methods"],
155
- "total_methods": ["methods", "methods_covered_percent", "covered_methods", "missed_methods"]
156
- },
157
- "properties": {
158
- "lines": {
159
- "type": "array",
160
- "description": "Per-source-line coverage. Element index N corresponds to source line N+1. Integer hit-count, null for non-relevant (blank/comment) lines, or the string \"ignored\" for lines inside a simplecov:disable / :nocov: region. Present if and only if `meta.line_coverage` is true. When present, the five line stat fields (`lines_covered_percent`, `covered_lines`, `missed_lines`, `omitted_lines`, `total_lines`) are guaranteed to be present too.",
161
- "items": {"$ref": "#/definitions/line_coverage"}
162
- },
163
- "source": {
164
- "type": "array",
165
- "description": "Source lines of the file, in order (one entry per physical line). When the per-file `lines` array is present it has the same length, but `source` is emitted independently of line coverage. Present only when SimpleCov.source_in_json is true (the default); omitted when downstream tools opt out via `source_in_json false` to keep coverage.json smaller.",
166
- "items": {"type": "string"}
167
- },
168
- "lines_covered_percent": {"type": "number"},
169
- "covered_lines": {"type": "integer", "minimum": 0, "description": "Count of executable lines that were hit at least once."},
170
- "missed_lines": {"type": "integer", "minimum": 0, "description": "Count of executable lines that were never hit."},
171
- "omitted_lines": {"type": "integer", "minimum": 0, "description": "Count of non-executable lines (blank lines, comments). Mirrors `total.lines.omitted` at the per-file level. Excludes lines inside simplecov:disable / :nocov: regions, which surface as `\"ignored\"` in the `lines` array."},
172
- "total_lines": {"type": "integer", "minimum": 0, "description": "Count of executable lines: `covered_lines + missed_lines`. Does not include non-executable (omitted) lines or lines inside simplecov:disable / :nocov: regions, so this can be smaller than `lines.length`."},
173
- "branches": {
174
- "type": "array",
175
- "description": "Per-branch coverage. Present if and only if `meta.branch_coverage` is true. When present, the four branch stat fields (`branches_covered_percent`, `covered_branches`, `missed_branches`, `total_branches`) are guaranteed to be present too.",
176
- "items": {"$ref": "#/definitions/branch"}
177
- },
178
- "branches_covered_percent": {"type": "number"},
179
- "covered_branches": {"type": "integer", "minimum": 0},
180
- "missed_branches": {"type": "integer", "minimum": 0},
181
- "total_branches": {"type": "integer", "minimum": 0, "description": "Count of branches: `covered_branches + missed_branches`."},
182
- "methods": {
183
- "type": "array",
184
- "description": "Per-method coverage. Present if and only if `meta.method_coverage` is true. When present, the four method stat fields (`methods_covered_percent`, `covered_methods`, `missed_methods`, `total_methods`) are guaranteed to be present too.",
185
- "items": {"$ref": "#/definitions/method"}
186
- },
187
- "methods_covered_percent": {"type": "number"},
188
- "covered_methods": {"type": "integer", "minimum": 0},
189
- "missed_methods": {"type": "integer", "minimum": 0},
190
- "total_methods": {"type": "integer", "minimum": 0, "description": "Count of methods: `covered_methods + missed_methods`."}
191
- }
192
- },
193
- "branch": {
194
- "type": "object",
195
- "required": ["type", "start_line", "end_line", "coverage", "inline", "report_line"],
196
- "additionalProperties": false,
197
- "properties": {
198
- "type": {
199
- "type": "string",
200
- "description": "Branch kind from Ruby's Coverage library (e.g. \"then\", \"else\", \"when\")."
201
- },
202
- "start_line": {"type": "integer", "minimum": 1},
203
- "end_line": {"type": "integer", "minimum": 1},
204
- "coverage": {"$ref": "#/definitions/branch_method_coverage"},
205
- "inline": {"type": "boolean"},
206
- "report_line": {"type": "integer", "minimum": 1, "description": "Line of the conditional that owns this branch (the `if`, `case`, or `&&` line), not the start of the branch body. Useful for rendering annotations at the decision point."}
207
- }
208
- },
209
- "method": {
210
- "type": "object",
211
- "required": ["name", "start_line", "end_line", "coverage"],
212
- "additionalProperties": false,
213
- "properties": {
214
- "name": {
215
- "type": "string",
216
- "description": "Qualified method name, e.g. \"Foo#bar\", \"Foo.bar\", or \"Foo::Bar#baz\"."
217
- },
218
- "start_line": {"type": "integer", "minimum": 1},
219
- "end_line": {"type": "integer", "minimum": 1},
220
- "coverage": {"$ref": "#/definitions/branch_method_coverage"}
221
- }
222
- },
223
- "group": {
224
- "type": "object",
225
- "required": ["files"],
226
- "additionalProperties": false,
227
- "anyOf": [
228
- {"required": ["lines"]},
229
- {"required": ["branches"]},
230
- {"required": ["methods"]}
231
- ],
232
- "properties": {
233
- "lines": {"$ref": "#/definitions/line_statistic"},
234
- "branches": {"$ref": "#/definitions/coverage_statistic"},
235
- "methods": {"$ref": "#/definitions/coverage_statistic"},
236
- "files": {
237
- "type": "array",
238
- "description": "Project-relative paths of the files that fell into this group.",
239
- "items": {"type": "string"}
240
- }
241
- }
242
- },
243
- "line_statistic": {
244
- "type": "object",
245
- "required": ["covered", "missed", "omitted", "total", "percent", "strength"],
246
- "additionalProperties": false,
247
- "properties": {
248
- "covered": {"type": "integer", "minimum": 0},
249
- "missed": {"type": "integer", "minimum": 0},
250
- "omitted": {
251
- "type": "integer",
252
- "minimum": 0,
253
- "description": "Lines that cannot be covered (blank, comment, etc.). Only present on line stats."
254
- },
255
- "total": {"type": "integer", "minimum": 0, "description": "Executable lines: `covered + missed`. Does not include `omitted`."},
256
- "percent": {"type": "number"},
257
- "strength": {"type": "number", "description": "Average executions per coverable line: the sum of hit counts divided by `covered + missed`."}
258
- }
259
- },
260
- "coverage_statistic": {
261
- "type": "object",
262
- "required": ["covered", "missed", "total", "percent", "strength"],
263
- "additionalProperties": false,
264
- "properties": {
265
- "covered": {"type": "integer", "minimum": 0},
266
- "missed": {"type": "integer", "minimum": 0},
267
- "total": {"type": "integer", "minimum": 0, "description": "Total branches or methods: `covered + missed`."},
268
- "percent": {"type": "number"},
269
- "strength": {"type": "number", "description": "Average executions per coverable branch or method: the sum of hit counts divided by `covered + missed`."}
270
- }
271
- },
272
- "line_coverage": {
273
- "description": "Coverage value for a source line in the per-file `lines` array. Integer hit count, `null` for a non-executable line (blank or comment), or the literal string `\"ignored\"` for a line inside a simplecov:disable / :nocov: region.",
274
- "oneOf": [
275
- {"type": "integer", "minimum": 0},
276
- {"type": "null"},
277
- {"type": "string", "const": "ignored"}
278
- ]
279
- },
280
- "branch_method_coverage": {
281
- "description": "Coverage value for a branch or method `coverage` field. Integer hit count, or the literal string `\"ignored\"` for code inside a simplecov:disable / :nocov: region. Unlike line coverage, `null` never occurs: every branch and method maps to an executable construct.",
282
- "oneOf": [
283
- {"type": "integer", "minimum": 0},
284
- {"type": "string", "const": "ignored"}
285
- ]
286
- },
287
- "expected_actual": {
288
- "type": "object",
289
- "required": ["expected", "actual"],
290
- "additionalProperties": false,
291
- "properties": {
292
- "expected": {"type": "number"},
293
- "actual": {"type": "number"}
294
- }
295
- },
296
- "maximum_actual": {
297
- "type": "object",
298
- "required": ["maximum", "actual"],
299
- "additionalProperties": false,
300
- "properties": {
301
- "maximum": {"type": "number"},
302
- "actual": {"type": "number"}
303
- }
304
- }
305
- }
306
- }