simplecov 0.22.0 → 1.3.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.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +173 -875
- data/exe/simplecov +8 -0
- data/lib/minitest/simplecov_plugin.rb +18 -7
- data/lib/simplecov/atomic_file.rb +67 -0
- data/lib/simplecov/autostart.rb +9 -0
- data/lib/simplecov/baseline/parser.rb +58 -0
- data/lib/simplecov/baseline.rb +170 -0
- data/lib/simplecov/cli/affected/changed_files.rb +57 -0
- data/lib/simplecov/cli/affected/selection.rb +117 -0
- data/lib/simplecov/cli/affected.rb +148 -0
- data/lib/simplecov/cli/annotations.rb +166 -0
- data/lib/simplecov/cli/badge/svg.rb +70 -0
- data/lib/simplecov/cli/badge.rb +62 -0
- data/lib/simplecov/cli/clean.rb +86 -0
- data/lib/simplecov/cli/command_helpers.rb +91 -0
- data/lib/simplecov/cli/completions/scripts.rb +114 -0
- data/lib/simplecov/cli/completions.rb +83 -0
- data/lib/simplecov/cli/coverage.rb +83 -0
- data/lib/simplecov/cli/coverage_file.rb +109 -0
- data/lib/simplecov/cli/dead_code/output.rb +100 -0
- data/lib/simplecov/cli/dead_code.rb +139 -0
- data/lib/simplecov/cli/diff/output.rb +45 -0
- data/lib/simplecov/cli/diff.rb +115 -0
- data/lib/simplecov/cli/dotfile.rb +156 -0
- data/lib/simplecov/cli/git.rb +41 -0
- data/lib/simplecov/cli/history/output.rb +135 -0
- data/lib/simplecov/cli/history.rb +67 -0
- data/lib/simplecov/cli/merge.rb +115 -0
- data/lib/simplecov/cli/open.rb +45 -0
- data/lib/simplecov/cli/patch/changed_lines.rb +149 -0
- data/lib/simplecov/cli/patch/output.rb +151 -0
- data/lib/simplecov/cli/patch.rb +175 -0
- data/lib/simplecov/cli/ratchet/output.rb +44 -0
- data/lib/simplecov/cli/ratchet.rb +83 -0
- data/lib/simplecov/cli/report.rb +91 -0
- data/lib/simplecov/cli/run.rb +35 -0
- data/lib/simplecov/cli/serve/report_preparer.rb +30 -0
- data/lib/simplecov/cli/serve/static_file_handler.rb +128 -0
- data/lib/simplecov/cli/serve.rb +88 -0
- data/lib/simplecov/cli/show/annotator.rb +87 -0
- data/lib/simplecov/cli/show/sweep.rb +36 -0
- data/lib/simplecov/cli/show.rb +133 -0
- data/lib/simplecov/cli/status/facts.rb +87 -0
- data/lib/simplecov/cli/status.rb +93 -0
- data/lib/simplecov/cli/tests/redundancy.rb +78 -0
- data/lib/simplecov/cli/tests.rb +148 -0
- data/lib/simplecov/cli/uncovered/misses.rb +33 -0
- data/lib/simplecov/cli/uncovered.rb +127 -0
- data/lib/simplecov/cli/usage.rb +153 -0
- data/lib/simplecov/cli/watch/live_report.rb +73 -0
- data/lib/simplecov/cli/watch/narrator.rb +55 -0
- data/lib/simplecov/cli/watch/poller.rb +45 -0
- data/lib/simplecov/cli/watch/session.rb +134 -0
- data/lib/simplecov/cli/watch/test_plan.rb +43 -0
- data/lib/simplecov/cli/watch.rb +85 -0
- data/lib/simplecov/cli.rb +114 -0
- data/lib/simplecov/color.rb +65 -0
- data/lib/simplecov/combine/branches_combiner.rb +44 -21
- data/lib/simplecov/combine/coverage_accumulator.rb +175 -0
- data/lib/simplecov/combine/identity_interner.rb +27 -0
- data/lib/simplecov/combine/interned_counts.rb +28 -0
- data/lib/simplecov/combine/lines_combiner.rb +35 -29
- data/lib/simplecov/combine/methods_combiner.rb +48 -0
- data/lib/simplecov/combine/results_combiner.rb +9 -49
- data/lib/simplecov/combine.rb +0 -24
- data/lib/simplecov/command_guesser.rb +99 -42
- data/lib/simplecov/configuration/baseline.rb +31 -0
- data/lib/simplecov/configuration/coverage.rb +184 -0
- data/lib/simplecov/configuration/coverage_criteria.rb +143 -0
- data/lib/simplecov/configuration/deprecations.rb +21 -0
- data/lib/simplecov/configuration/eval_coverage.rb +37 -0
- data/lib/simplecov/configuration/filters.rb +131 -0
- data/lib/simplecov/configuration/formatting.rb +129 -0
- data/lib/simplecov/configuration/groups.rb +48 -0
- data/lib/simplecov/configuration/history.rb +44 -0
- data/lib/simplecov/configuration/ignored_entries.rb +72 -0
- data/lib/simplecov/configuration/merging.rb +197 -0
- data/lib/simplecov/configuration/missed_caps.rb +51 -0
- data/lib/simplecov/configuration/production.rb +23 -0
- data/lib/simplecov/configuration/test_tracking.rb +48 -0
- data/lib/simplecov/configuration/thresholds.rb +150 -0
- data/lib/simplecov/configuration/view_coverage.rb +37 -0
- data/lib/simplecov/configuration.rb +100 -443
- data/lib/simplecov/configuration_error.rb +5 -0
- data/lib/simplecov/context_map/union.rb +81 -0
- data/lib/simplecov/context_map.rb +187 -0
- data/lib/simplecov/coverage_json.rb +21 -0
- data/lib/simplecov/coverage_statistics.rb +24 -28
- data/lib/simplecov/coverage_violations.rb +254 -0
- data/lib/simplecov/current_run.rb +61 -0
- data/lib/simplecov/defaults.rb +20 -28
- data/lib/simplecov/deprecation.rb +63 -0
- data/lib/simplecov/directive/erb.rb +44 -0
- data/lib/simplecov/directive/haml.rb +33 -0
- data/lib/simplecov/directive/indented_template.rb +37 -0
- data/lib/simplecov/directive/slim.rb +35 -0
- data/lib/simplecov/directive/template.rb +29 -0
- data/lib/simplecov/directive.rb +152 -0
- data/lib/simplecov/exit_codes/baseline_check.rb +46 -0
- data/lib/simplecov/exit_codes/check.rb +39 -0
- data/lib/simplecov/exit_codes/exit_code_handling.rb +24 -5
- data/lib/simplecov/exit_codes/maximum_coverage_drop_check.rb +17 -67
- data/lib/simplecov/exit_codes/maximum_missed_check.rb +26 -0
- data/lib/simplecov/exit_codes/maximum_missed_per_file_check.rb +34 -0
- data/lib/simplecov/exit_codes/maximum_overall_coverage_check.rb +27 -0
- data/lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb +20 -38
- data/lib/simplecov/exit_codes/minimum_coverage_by_group_check.rb +28 -0
- data/lib/simplecov/exit_codes/minimum_overall_coverage_check.rb +37 -34
- data/lib/simplecov/exit_codes.rb +26 -0
- data/lib/simplecov/exit_handling.rb +163 -0
- data/lib/simplecov/file_list.rb +63 -48
- data/lib/simplecov/filter.rb +98 -42
- data/lib/simplecov/formatter/base.rb +100 -0
- data/lib/simplecov/formatter/baseline_formatter.rb +98 -0
- data/lib/simplecov/formatter/coverage_json_writer.rb +95 -0
- data/lib/simplecov/formatter/html_formatter/public/index.html +93 -0
- data/lib/simplecov/formatter/html_formatter/viewer_data_validator.rb +153 -0
- data/lib/simplecov/formatter/html_formatter.rb +88 -0
- data/lib/simplecov/formatter/json_formatter/errors_formatter.rb +122 -0
- data/lib/simplecov/formatter/json_formatter/production_section_formatter.rb +48 -0
- data/lib/simplecov/formatter/json_formatter/result_hash_formatter.rb +132 -0
- data/lib/simplecov/formatter/json_formatter/source_file_formatter.rb +97 -0
- data/lib/simplecov/formatter/json_formatter.rb +40 -0
- data/lib/simplecov/formatter/multi_formatter.rb +8 -10
- data/lib/simplecov/formatter/simple_formatter.rb +12 -15
- data/lib/simplecov/formatter.rb +21 -1
- data/lib/simplecov/group_names.rb +33 -0
- data/lib/simplecov/history.rb +115 -0
- data/lib/simplecov/last_run.rb +16 -5
- data/lib/simplecov/lines_classifier.rb +67 -19
- data/lib/simplecov/load_global_config.rb +12 -4
- data/lib/simplecov/parallel_adapters/base.rb +50 -0
- data/lib/simplecov/parallel_adapters/generic.rb +33 -0
- data/lib/simplecov/parallel_adapters/parallel_tests.rb +72 -0
- data/lib/simplecov/parallel_adapters.rb +54 -0
- data/lib/simplecov/parallel_coordination.rb +124 -0
- data/lib/simplecov/parallel_result_merger/worker_payload.rb +33 -0
- data/lib/simplecov/parallel_result_merger.rb +171 -0
- data/lib/simplecov/process.rb +34 -12
- data/lib/simplecov/production/error.rb +11 -0
- data/lib/simplecov/production/file_sink.rb +130 -0
- data/lib/simplecov/production.rb +249 -0
- data/lib/simplecov/profiles/bundler_filter.rb +1 -1
- data/lib/simplecov/profiles/hidden_filter.rb +1 -1
- data/lib/simplecov/profiles/rails.rb +13 -10
- data/lib/simplecov/profiles/root_filter.rb +2 -5
- data/lib/simplecov/profiles/strict.rb +22 -0
- data/lib/simplecov/profiles/test_frameworks.rb +1 -4
- data/lib/simplecov/profiles.rb +26 -19
- data/lib/simplecov/report_deferral.rb +45 -0
- data/lib/simplecov/report_stamp.rb +25 -0
- data/lib/simplecov/result/filter_config.rb +19 -0
- data/lib/simplecov/result/missing_source_files_reporter.rb +48 -0
- data/lib/simplecov/result/serialization.rb +43 -0
- data/lib/simplecov/result/source_file_builder.rb +46 -0
- data/lib/simplecov/result.rb +123 -47
- data/lib/simplecov/result_adapter.rb +130 -11
- data/lib/simplecov/result_merger/contexts.rb +22 -0
- data/lib/simplecov/result_merger/legacy_format_adapter.rb +24 -0
- data/lib/simplecov/result_merger/resultset_file.rb +67 -0
- data/lib/simplecov/result_merger/resultset_run_identity.rb +65 -0
- data/lib/simplecov/result_merger/resultset_store.rb +62 -0
- data/lib/simplecov/result_merger/unloaded_files.rb +95 -0
- data/lib/simplecov/result_merger.rb +120 -124
- data/lib/simplecov/result_processing.rb +188 -0
- data/lib/simplecov/run_identity.rb +75 -0
- data/lib/simplecov/simulate_coverage.rb +72 -17
- data/lib/simplecov/source_file/branch.rb +8 -35
- data/lib/simplecov/source_file/branch_builder.rb +95 -0
- data/lib/simplecov/source_file/builder_context.rb +28 -0
- data/lib/simplecov/source_file/line.rb +17 -32
- data/lib/simplecov/source_file/line_builder.rb +37 -0
- data/lib/simplecov/source_file/method.rb +54 -0
- data/lib/simplecov/source_file/method_builder.rb +51 -0
- data/lib/simplecov/source_file/ruby_data_parser.rb +103 -0
- data/lib/simplecov/source_file/skip_chunks.rb +72 -0
- data/lib/simplecov/source_file/source_loader.rb +89 -0
- data/lib/simplecov/source_file/statistics.rb +76 -0
- data/lib/simplecov/source_file.rb +64 -260
- data/lib/simplecov/static_coverage_extractor/condition_folding.rb +155 -0
- data/lib/simplecov/static_coverage_extractor/location_conventions.rb +191 -0
- data/lib/simplecov/static_coverage_extractor/method_collector.rb +45 -0
- data/lib/simplecov/static_coverage_extractor/prism_compat.rb +46 -0
- data/lib/simplecov/static_coverage_extractor/value_position.rb +61 -0
- data/lib/simplecov/static_coverage_extractor/visitor.rb +163 -0
- data/lib/simplecov/static_coverage_extractor.rb +78 -0
- data/lib/simplecov/test_tracker/accessors.rb +34 -0
- data/lib/simplecov/test_tracker/constant_watch.rb +49 -0
- data/lib/simplecov/test_tracker/delta.rb +69 -0
- data/lib/simplecov/test_tracker/framework_hooks.rb +130 -0
- data/lib/simplecov/test_tracker.rb +162 -0
- data/lib/simplecov/unloaded_file_injector.rb +62 -0
- data/lib/simplecov/useless_results_remover.rb +17 -7
- data/lib/simplecov/version.rb +1 -1
- data/lib/simplecov/view_coverage/template_compiler.rb +83 -0
- data/lib/simplecov/view_coverage.rb +55 -0
- data/lib/simplecov-html.rb +5 -0
- data/lib/simplecov.rb +143 -394
- data/lib/simplecov_json_formatter.rb +5 -0
- data/man/simplecov.1 +354 -0
- data/sig/simplecov.rbs +1710 -0
- metadata +183 -61
- data/CHANGELOG.md +0 -191
- data/doc/alternate-formatters.md +0 -71
- data/doc/commercial-services.md +0 -25
- data/doc/editor-integration.md +0 -18
- data/lib/simplecov/combine/files_combiner.rb +0 -24
- data/lib/simplecov/default_formatter.rb +0 -20
data/sig/simplecov.rbs
ADDED
|
@@ -0,0 +1,1710 @@
|
|
|
1
|
+
module SimpleCov
|
|
2
|
+
type criterion = :line | :branch | :method
|
|
3
|
+
type line_coverage_alternatives = Hash[criterion | :oneshot_line, :line | :oneshot_line]
|
|
4
|
+
|
|
5
|
+
type filter_arg = String | Regexp | Filter[untyped] | ^(SourceFile source_file) -> boolish | Array[filter_arg]
|
|
6
|
+
|
|
7
|
+
type cover_arg = String | Regexp | ^(SourceFile source_file) -> boolish | Filter[untyped] | Array[cover_arg]
|
|
8
|
+
|
|
9
|
+
class ConfigurationError < StandardError
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
module GroupNames
|
|
13
|
+
UNGROUPED: String
|
|
14
|
+
|
|
15
|
+
def self?.normalize: (untyped group_name) -> String
|
|
16
|
+
|
|
17
|
+
def self?.validate!: (Array[String] group_names) -> Array[String]
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
CRITERION_TO_RUBY_COVERAGE: Hash[Symbol, Symbol]
|
|
21
|
+
|
|
22
|
+
extend Configuration
|
|
23
|
+
extend SingleForwardable
|
|
24
|
+
|
|
25
|
+
self.@current_run: CurrentRun?
|
|
26
|
+
self.@autoloading_dot_simplecov: bool?
|
|
27
|
+
self.@dot_simplecov_start_warned: bool?
|
|
28
|
+
self.@at_exit_hook_installed: bool?
|
|
29
|
+
self.@run_id: String?
|
|
30
|
+
self.@worker_id: String?
|
|
31
|
+
|
|
32
|
+
def self.current_run: () -> CurrentRun
|
|
33
|
+
|
|
34
|
+
attr_writer self.current_run: CurrentRun?
|
|
35
|
+
|
|
36
|
+
attr_accessor self.pid: Integer?
|
|
37
|
+
|
|
38
|
+
attr_accessor self.process_start_time: Time?
|
|
39
|
+
|
|
40
|
+
def self.run_id: () -> String
|
|
41
|
+
|
|
42
|
+
def self.worker_id: () -> String
|
|
43
|
+
|
|
44
|
+
def self.track_test: [T] (String test_id) { () -> T } -> T
|
|
45
|
+
|
|
46
|
+
def self.test_tracker: () -> TestTracker?
|
|
47
|
+
|
|
48
|
+
def self.start_test_tracking: () -> void
|
|
49
|
+
|
|
50
|
+
attr_accessor self.external_at_exit: bool?
|
|
51
|
+
|
|
52
|
+
def self.external_at_exit?: () -> bool
|
|
53
|
+
|
|
54
|
+
def self.subprocess_serial: () -> Integer
|
|
55
|
+
|
|
56
|
+
def self.next_subprocess_serial!: () -> Integer
|
|
57
|
+
|
|
58
|
+
def self.forked_subprocess?: () -> bool
|
|
59
|
+
|
|
60
|
+
def self.mark_forked_subprocess!: () -> void
|
|
61
|
+
|
|
62
|
+
def self.coverage_statistics_key: ((criterion | :oneshot_line) criterion) -> criterion
|
|
63
|
+
|
|
64
|
+
def self.start: (?(String | Symbol)? profile) ?{ () [self: singleton(SimpleCov)] -> void } -> void
|
|
65
|
+
|
|
66
|
+
def self.with_dot_simplecov_autoload: [T] () { () -> T } -> T
|
|
67
|
+
|
|
68
|
+
def self.warn_about_start_in_dot_simplecov: () -> void
|
|
69
|
+
|
|
70
|
+
def self.install_at_exit_hook: () -> void
|
|
71
|
+
|
|
72
|
+
def self.reset_inherited_at_exit_state!: () -> void
|
|
73
|
+
|
|
74
|
+
def self.start_tracking: () -> void
|
|
75
|
+
|
|
76
|
+
def self.start_coverage_measurement: () -> void
|
|
77
|
+
|
|
78
|
+
def self.minitest_autorun_pending?: () -> bool
|
|
79
|
+
|
|
80
|
+
def self.defer_to_minitest_after_run: () -> void
|
|
81
|
+
|
|
82
|
+
def self.warn_if_jruby_full_trace_disabled: () -> void
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
module SimpleCov
|
|
87
|
+
VERSION: String
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
module SimpleCov
|
|
92
|
+
self.@result: Result?
|
|
93
|
+
|
|
94
|
+
def self.collate: (Array[String] result_filenames, ?(String | Symbol)? profile, ?processes: Integer, ?ignore_timeout: bool) ?{ () [self: singleton(SimpleCov)] -> void } -> void
|
|
95
|
+
|
|
96
|
+
def self.result: () -> Result?
|
|
97
|
+
|
|
98
|
+
def self.merge_own_slice: () -> untyped
|
|
99
|
+
|
|
100
|
+
def self.build_result: (untyped raw, untyped coverage, not_loaded: untyped, tracked: untyped, report: untyped) -> Result
|
|
101
|
+
|
|
102
|
+
def self.result?: () -> (Result | false | nil)
|
|
103
|
+
|
|
104
|
+
def self.collating_result?: () -> boolish
|
|
105
|
+
|
|
106
|
+
def self.filtered: ((Array[SourceFile] | FileList) files) -> FileList
|
|
107
|
+
|
|
108
|
+
def self.grouped: ((Array[SourceFile] | FileList) files, ?groups: Hash[String, Filter[untyped]]) -> Hash[String, FileList]
|
|
109
|
+
|
|
110
|
+
def self.load_profile: ((String | Symbol) name) -> void
|
|
111
|
+
|
|
112
|
+
def self.clear_result: () -> void
|
|
113
|
+
|
|
114
|
+
def self.write_last_run: (Result result) -> void
|
|
115
|
+
|
|
116
|
+
def self.round_coverage: (Numeric coverage) -> Numeric
|
|
117
|
+
|
|
118
|
+
def self.initial_setup: ((String | Symbol)? profile) ?{ () [self: singleton(SimpleCov)] -> void } -> void
|
|
119
|
+
|
|
120
|
+
def self.grouped_file_set: (Hash[String, FileList] grouped) -> Set[SourceFile]
|
|
121
|
+
|
|
122
|
+
def self.unloaded_file_discovery_globs: () -> Array[String]
|
|
123
|
+
|
|
124
|
+
def self.tracked_file_paths: () -> Array[String]
|
|
125
|
+
|
|
126
|
+
def self.warn_templates_tracked: (Array[String] templates) -> void
|
|
127
|
+
|
|
128
|
+
def self.inject_unloaded_files: (Hash[String, untyped] result, Array[String] candidate_paths, ?synthesize: bool?, ?lines: bool?) -> [Hash[String, untyped], Set[String]]
|
|
129
|
+
|
|
130
|
+
def self.collect_own_coverage: (standalone: bool) -> void
|
|
131
|
+
|
|
132
|
+
def self.process_coverage_result: (report: bool, ?inject_unloaded: bool) -> void
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
module SimpleCov
|
|
137
|
+
module Configuration
|
|
138
|
+
def __send__: (Symbol name, *untyped args) -> untyped
|
|
139
|
+
|
|
140
|
+
@root: String
|
|
141
|
+
@coverage_dir: String
|
|
142
|
+
@coverage_dir_explicit: bool?
|
|
143
|
+
@coverage_path: String?
|
|
144
|
+
@coverage_path_explicit: bool?
|
|
145
|
+
@command_name: String?
|
|
146
|
+
@profiles: Profiles?
|
|
147
|
+
@at_exit: Proc?
|
|
148
|
+
@at_fork: Proc?
|
|
149
|
+
@project_name: String?
|
|
150
|
+
|
|
151
|
+
def root: (?String? root) -> String
|
|
152
|
+
|
|
153
|
+
def root=: (String? root) -> String
|
|
154
|
+
|
|
155
|
+
def coverage_dir: (?String? dir) -> String
|
|
156
|
+
|
|
157
|
+
def coverage_dir=: (String? dir) -> String
|
|
158
|
+
|
|
159
|
+
def coverage_path: (?String? path) -> String
|
|
160
|
+
|
|
161
|
+
def coverage_path=: (String path) -> untyped
|
|
162
|
+
|
|
163
|
+
def command_name: (?String? name) -> String
|
|
164
|
+
|
|
165
|
+
def command_name=: (String name) -> String
|
|
166
|
+
|
|
167
|
+
def profiles: () -> Profiles
|
|
168
|
+
|
|
169
|
+
def configure: () { () [self: self] -> untyped } -> self
|
|
170
|
+
| () { (self config) -> untyped } -> self
|
|
171
|
+
|
|
172
|
+
def at_exit: () ?{ () -> void } -> Proc
|
|
173
|
+
|
|
174
|
+
def active_session?: () -> bool
|
|
175
|
+
|
|
176
|
+
def coverage_running?: () -> bool
|
|
177
|
+
|
|
178
|
+
def at_fork: () ?{ (Integer pid) -> void } -> Proc
|
|
179
|
+
|
|
180
|
+
def project_name: (?String? new_name) -> String
|
|
181
|
+
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
module SimpleCov
|
|
187
|
+
module Configuration
|
|
188
|
+
SUPPORTED_COVERAGE_CRITERIA: Array[Symbol]
|
|
189
|
+
|
|
190
|
+
DEFAULT_COVERAGE_CRITERION: :line
|
|
191
|
+
|
|
192
|
+
ONESHOT_LINE_COVERAGE_CRITERION: :oneshot_line
|
|
193
|
+
|
|
194
|
+
LINE_COVERAGE_ALTERNATIVES: line_coverage_alternatives
|
|
195
|
+
|
|
196
|
+
@primary_coverage: (criterion | :oneshot_line)?
|
|
197
|
+
@coverage_criteria: Set[criterion | :oneshot_line]?
|
|
198
|
+
@coverage_for_eval_enabled: bool?
|
|
199
|
+
|
|
200
|
+
def enable_coverage: (*(criterion | :oneshot_line | :eval) criteria) -> void
|
|
201
|
+
|
|
202
|
+
def disable_coverage: ((criterion | :oneshot_line | :eval) criterion) -> void
|
|
203
|
+
|
|
204
|
+
def primary_coverage: (?(criterion | :oneshot_line)? criterion) -> (criterion | :oneshot_line)
|
|
205
|
+
|
|
206
|
+
def primary_coverage=: ((criterion | :oneshot_line) criterion) -> (criterion | :oneshot_line)
|
|
207
|
+
|
|
208
|
+
def coverage_criteria: () -> Set[criterion | :oneshot_line]
|
|
209
|
+
|
|
210
|
+
def coverage_criterion_enabled?: (Symbol criterion) -> bool
|
|
211
|
+
|
|
212
|
+
def clear_coverage_criteria: () -> void
|
|
213
|
+
|
|
214
|
+
def validate_coverage_criteria!: () -> void
|
|
215
|
+
|
|
216
|
+
def line_coverage?: () -> bool
|
|
217
|
+
|
|
218
|
+
def branch_coverage?: () -> bool
|
|
219
|
+
|
|
220
|
+
def branch_coverage_supported?: () -> bool
|
|
221
|
+
|
|
222
|
+
def method_coverage?: () -> bool
|
|
223
|
+
|
|
224
|
+
def method_coverage_supported?: () -> bool
|
|
225
|
+
|
|
226
|
+
def coverage_criterion_supported?: (Symbol criterion) -> bool
|
|
227
|
+
|
|
228
|
+
def load_coverage: () -> untyped
|
|
229
|
+
|
|
230
|
+
private
|
|
231
|
+
|
|
232
|
+
def add_coverage_criterion: ((criterion | :oneshot_line) criterion) -> void
|
|
233
|
+
|
|
234
|
+
def default_primary_coverage: () -> (criterion | :oneshot_line)
|
|
235
|
+
|
|
236
|
+
def raise_if_criterion_disabled: (Symbol criterion) -> void
|
|
237
|
+
|
|
238
|
+
def raise_if_criterion_unsupported: (Symbol criterion) -> void
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
module SimpleCov
|
|
244
|
+
module Configuration
|
|
245
|
+
def coverage_for_eval_supported?: () -> bool
|
|
246
|
+
|
|
247
|
+
def coverage_for_eval_enabled?: () -> bool
|
|
248
|
+
|
|
249
|
+
def enable_coverage_for_eval: () -> void
|
|
250
|
+
|
|
251
|
+
private
|
|
252
|
+
|
|
253
|
+
def enable_eval_coverage: () -> void
|
|
254
|
+
|
|
255
|
+
def disable_eval_coverage: () -> void
|
|
256
|
+
end
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
module SimpleCov
|
|
261
|
+
module Configuration
|
|
262
|
+
DEFAULT_VIEW_GLOBS: Array[String]
|
|
263
|
+
|
|
264
|
+
@view_globs: Array[String]?
|
|
265
|
+
|
|
266
|
+
def cover_views: (*(String | Array[String?] | nil) globs) -> Array[String]
|
|
267
|
+
|
|
268
|
+
def view_globs: () -> Array[String]?
|
|
269
|
+
|
|
270
|
+
def view_coverage?: () -> bool
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
module SimpleCov
|
|
276
|
+
module Configuration
|
|
277
|
+
COVERAGE_THRESHOLD_OPTIONS: Array[Symbol]
|
|
278
|
+
|
|
279
|
+
def coverage: ((criterion | :eval) criterion, ?primary: bool, ?enabled: bool, ?oneshot: bool, **untyped thresholds) ?{ (?CoverageCriterion) [self: CoverageCriterion] -> void } -> (criterion | :oneshot_line | :eval)
|
|
280
|
+
|
|
281
|
+
private
|
|
282
|
+
|
|
283
|
+
def apply_threshold_options: (CoverageCriterion configurator, Hash[Symbol, untyped] options) -> void
|
|
284
|
+
|
|
285
|
+
def enable_coverage_criterion: ((criterion | :eval) criterion, enabled: bool, oneshot: bool) -> (criterion | :oneshot_line | :eval)
|
|
286
|
+
|
|
287
|
+
def resolve_criterion_variant: ((criterion | :eval) criterion, bool oneshot) -> (criterion | :oneshot_line | :eval)
|
|
288
|
+
|
|
289
|
+
def store_overall_threshold: (Symbol setting, Symbol criterion, Numeric percent) -> void
|
|
290
|
+
|
|
291
|
+
def store_minimum_per_file: (Symbol criterion, Numeric percent, (String | Regexp)? target) -> void
|
|
292
|
+
|
|
293
|
+
def store_minimum_per_group: (Symbol criterion, Numeric percent, String group_name) -> void
|
|
294
|
+
|
|
295
|
+
def store_missed_cap: (Symbol setting, Symbol criterion, Integer count) -> void
|
|
296
|
+
|
|
297
|
+
def store_maximum_missed_per_file: (Symbol criterion, Integer count, (String | Regexp)? target) -> void
|
|
298
|
+
|
|
299
|
+
public
|
|
300
|
+
|
|
301
|
+
class CoverageCriterion
|
|
302
|
+
type per_target = nil | :file | String | Regexp | GroupTarget
|
|
303
|
+
|
|
304
|
+
class GroupTarget
|
|
305
|
+
attr_reader name: String | Symbol
|
|
306
|
+
|
|
307
|
+
def initialize: (name: String | Symbol) -> void
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
@config: Configuration
|
|
311
|
+
@criterion: Symbol
|
|
312
|
+
|
|
313
|
+
def initialize: (Configuration config, Symbol criterion) -> void
|
|
314
|
+
|
|
315
|
+
def minimum: (Numeric percent, ?per: per_target) -> void
|
|
316
|
+
|
|
317
|
+
def maximum: (Numeric percent) -> void
|
|
318
|
+
|
|
319
|
+
def exact: (Numeric percent) -> void
|
|
320
|
+
|
|
321
|
+
def maximum_drop: (Numeric percent) -> void
|
|
322
|
+
|
|
323
|
+
def maximum_missed: (Integer count, ?per: per_target) -> void
|
|
324
|
+
|
|
325
|
+
def group: (String | Symbol name) -> GroupTarget
|
|
326
|
+
|
|
327
|
+
def ignore: (*(Symbol | Array[Symbol]) types) -> Array[Symbol]
|
|
328
|
+
|
|
329
|
+
def minimum_per_file: (Numeric percent, ?only: (String | Regexp)?) -> void
|
|
330
|
+
|
|
331
|
+
def minimum_per_group: (Numeric percent, only: String) -> void
|
|
332
|
+
|
|
333
|
+
def maximum_missed_per_file: (Integer count, ?only: (String | Regexp)?) -> void
|
|
334
|
+
|
|
335
|
+
def primary: () -> void
|
|
336
|
+
|
|
337
|
+
private
|
|
338
|
+
|
|
339
|
+
def raise_invalid_per: (untyped per) -> bot
|
|
340
|
+
end
|
|
341
|
+
end
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
module SimpleCov
|
|
346
|
+
module Configuration
|
|
347
|
+
attr_writer filters: Array[Filter[untyped]]
|
|
348
|
+
|
|
349
|
+
attr_writer groups: Hash[String, Filter[untyped]]
|
|
350
|
+
|
|
351
|
+
@cover_filters: Array[Filter[untyped]]?
|
|
352
|
+
@tracked_files: String?
|
|
353
|
+
|
|
354
|
+
def cover: (*cover_arg args) ?{ (SourceFile source_file) -> boolish } -> Array[Filter[untyped]]
|
|
355
|
+
|
|
356
|
+
def cover_filters: () -> Array[Filter[untyped]]
|
|
357
|
+
|
|
358
|
+
def cover_globs: () -> Array[String]
|
|
359
|
+
|
|
360
|
+
def track_files: (String? glob) -> String?
|
|
361
|
+
|
|
362
|
+
def track_files_replacement_hint: (String? glob) -> String
|
|
363
|
+
|
|
364
|
+
def tracked_files: () -> String?
|
|
365
|
+
|
|
366
|
+
def filters: () -> Array[Filter[untyped]]
|
|
367
|
+
|
|
368
|
+
def skip: (?filter_arg? filter_argument) ?{ (SourceFile source_file) -> boolish } -> Array[Filter[untyped]]
|
|
369
|
+
|
|
370
|
+
def add_filter: (?filter_arg? filter_argument) ?{ (SourceFile source_file) -> boolish } -> Array[Filter[untyped]]
|
|
371
|
+
|
|
372
|
+
def remove_filter: (untyped filter_argument) -> bool
|
|
373
|
+
|
|
374
|
+
def clear_filters: () -> Array[Filter[untyped]]
|
|
375
|
+
|
|
376
|
+
def groups: () -> Hash[String, Filter[untyped]]
|
|
377
|
+
|
|
378
|
+
def default_groups: () -> Hash[String, Filter[untyped]]
|
|
379
|
+
|
|
380
|
+
def group: (String group_name, ?filter_arg? filter_argument) ?{ (SourceFile source_file) -> boolish } -> Filter[untyped]
|
|
381
|
+
|
|
382
|
+
def add_group: (String group_name, ?filter_arg? filter_argument) ?{ (SourceFile source_file) -> boolish } -> Filter[untyped]
|
|
383
|
+
|
|
384
|
+
def no_default_skips: () -> Array[Filter[untyped]]
|
|
385
|
+
|
|
386
|
+
private
|
|
387
|
+
|
|
388
|
+
def parse_filter: (?filter_arg? filter_argument) ?{ (SourceFile source_file) -> boolish } -> Filter[untyped]
|
|
389
|
+
|
|
390
|
+
def build_cover_filter: (cover_arg arg) -> Filter[untyped]
|
|
391
|
+
|
|
392
|
+
def collect_cover_globs: (Array[Filter[untyped]] filter_list) -> Array[String]
|
|
393
|
+
end
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
module SimpleCov
|
|
398
|
+
module Configuration
|
|
399
|
+
attr_writer formatter: Class?
|
|
400
|
+
|
|
401
|
+
attr_writer print_error_status: bool
|
|
402
|
+
|
|
403
|
+
@color: bool | :auto
|
|
404
|
+
@source_in_json: bool
|
|
405
|
+
@nocov_token: String
|
|
406
|
+
|
|
407
|
+
BUILT_IN_FORMATS: Hash[Symbol, Symbol]
|
|
408
|
+
|
|
409
|
+
LAZY_FORMAT_REQUIRES: Hash[Symbol, String]
|
|
410
|
+
|
|
411
|
+
def formats: (*untyped names) -> (Array[Class] | Class | nil)
|
|
412
|
+
|
|
413
|
+
def formatter: (?(Class | false | :__no_arg__)? formatter) -> Class?
|
|
414
|
+
|
|
415
|
+
def formatters: (?(Array[Class] | Class | :__no_arg__)? formatters) -> (Array[Class] | Class | nil)
|
|
416
|
+
|
|
417
|
+
def formatters=: ((Array[Class] | Class)? formatters) -> void
|
|
418
|
+
|
|
419
|
+
def color: (?(bool | :auto | :__no_arg__) value) -> (bool | :auto)
|
|
420
|
+
|
|
421
|
+
def color=: (untyped value) -> untyped
|
|
422
|
+
|
|
423
|
+
def print_errors: (?(bool | :__no_arg__) value) -> bool
|
|
424
|
+
|
|
425
|
+
def print_errors=: (bool value) -> bool
|
|
426
|
+
|
|
427
|
+
def source_in_json: (?(bool | :__no_arg__) value) -> bool
|
|
428
|
+
|
|
429
|
+
def source_in_json=: (bool value) -> bool
|
|
430
|
+
|
|
431
|
+
def print_error_status: () -> bool
|
|
432
|
+
|
|
433
|
+
def nocov_token: (?String? nocov_token) -> String
|
|
434
|
+
|
|
435
|
+
alias skip_token nocov_token
|
|
436
|
+
|
|
437
|
+
def current_nocov_token: (?String? value) -> String
|
|
438
|
+
|
|
439
|
+
private
|
|
440
|
+
|
|
441
|
+
def combined_formatter: (Array[untyped] formatters) -> untyped
|
|
442
|
+
|
|
443
|
+
def resolve_format: (untyped name) -> untyped
|
|
444
|
+
|
|
445
|
+
def require_html_formatter: (untyped name) -> void
|
|
446
|
+
end
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
module SimpleCov
|
|
451
|
+
module Configuration
|
|
452
|
+
IGNORABLE_BRANCH_TYPES: Array[Symbol]
|
|
453
|
+
|
|
454
|
+
IGNORABLE_METHOD_TYPES: Array[Symbol]
|
|
455
|
+
|
|
456
|
+
@ignored_branches: Array[Symbol]?
|
|
457
|
+
@ignored_methods: Array[Symbol]?
|
|
458
|
+
|
|
459
|
+
def ignore_branches: (*(:implicit_else | :eval_generated) types) -> Array[Symbol]
|
|
460
|
+
|
|
461
|
+
def ignored_branches: () -> Array[Symbol]
|
|
462
|
+
|
|
463
|
+
def ignored_branch?: (Symbol type) -> bool
|
|
464
|
+
|
|
465
|
+
def ignore_methods: (*:eval_generated types) -> Array[Symbol]
|
|
466
|
+
|
|
467
|
+
def ignored_methods: () -> Array[Symbol]
|
|
468
|
+
|
|
469
|
+
def ignored_method?: (Symbol type) -> bool
|
|
470
|
+
|
|
471
|
+
private
|
|
472
|
+
|
|
473
|
+
def store_ignored_branches: (Array[Symbol] types) -> Array[Symbol]
|
|
474
|
+
|
|
475
|
+
def store_ignored_methods: (Array[Symbol] types) -> Array[Symbol]
|
|
476
|
+
|
|
477
|
+
def raise_if_branch_type_unsupported: (Symbol type) -> void
|
|
478
|
+
|
|
479
|
+
def raise_if_method_type_unsupported: (Symbol type) -> void
|
|
480
|
+
end
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
module SimpleCov
|
|
485
|
+
module Configuration
|
|
486
|
+
@track_tests: bool
|
|
487
|
+
@track_tests_granularity: Symbol?
|
|
488
|
+
|
|
489
|
+
TRACK_TESTS_GRANULARITIES: Array[Symbol]
|
|
490
|
+
|
|
491
|
+
def track_tests: (?bool? enabled, ?granularity: Symbol?) -> bool
|
|
492
|
+
|
|
493
|
+
def track_tests_granularity: () -> Symbol
|
|
494
|
+
|
|
495
|
+
def track_tests?: () -> bool
|
|
496
|
+
|
|
497
|
+
def validate_test_tracking!: () -> void
|
|
498
|
+
end
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
module SimpleCov
|
|
503
|
+
module Configuration
|
|
504
|
+
@enable_for_subprocesses: bool
|
|
505
|
+
@parallel_tests: bool?
|
|
506
|
+
@use_merging: bool
|
|
507
|
+
@finalize_merge: bool
|
|
508
|
+
@finalize_merge_explicit: bool
|
|
509
|
+
@finalize_merge_inference_warned: bool
|
|
510
|
+
@merge_timeout: Integer?
|
|
511
|
+
@parallel_wait_timeout: Integer?
|
|
512
|
+
|
|
513
|
+
def merge_subprocesses: (?bool? value) -> bool
|
|
514
|
+
|
|
515
|
+
def merge_subprocesses=: (bool? value) -> untyped
|
|
516
|
+
|
|
517
|
+
def enabled_for_subprocesses?: () -> bool
|
|
518
|
+
|
|
519
|
+
def parallel_tests: (?(:__no_arg__ | bool)? value) -> bool?
|
|
520
|
+
|
|
521
|
+
def parallel_tests=: (untyped value) -> untyped
|
|
522
|
+
|
|
523
|
+
def enable_for_subprocesses: (?bool? value) -> bool
|
|
524
|
+
|
|
525
|
+
def merging: (?bool? use) -> bool
|
|
526
|
+
|
|
527
|
+
def merging=: (bool use) -> bool
|
|
528
|
+
|
|
529
|
+
def finalize_merge: (*bool value) -> bool
|
|
530
|
+
|
|
531
|
+
def finalize_merge=: (bool value) -> bool
|
|
532
|
+
|
|
533
|
+
def finalize_merge?: () -> bool
|
|
534
|
+
|
|
535
|
+
def merge_finalization_owner?: () -> boolish
|
|
536
|
+
|
|
537
|
+
def use_merging: (?bool? use) -> bool
|
|
538
|
+
|
|
539
|
+
def merge_timeout: (?Integer? seconds) -> Integer
|
|
540
|
+
|
|
541
|
+
def merge_timeout=: (untyped seconds) -> untyped
|
|
542
|
+
|
|
543
|
+
def env_merge_timeout: () -> Integer?
|
|
544
|
+
|
|
545
|
+
def parallel_wait_timeout: (?Integer? seconds) -> Integer
|
|
546
|
+
|
|
547
|
+
def parallel_wait_timeout=: (untyped seconds) -> untyped
|
|
548
|
+
|
|
549
|
+
private
|
|
550
|
+
|
|
551
|
+
def inferred_finalize_merge?: () -> bool
|
|
552
|
+
|
|
553
|
+
def parallel_worker_environment?: () -> bool
|
|
554
|
+
|
|
555
|
+
def explicit_custom_coverage_destination?: () -> bool
|
|
556
|
+
|
|
557
|
+
def explicit_coverage_destination?: () -> boolish
|
|
558
|
+
|
|
559
|
+
def warn_about_inferred_finalize_merge: () -> void
|
|
560
|
+
|
|
561
|
+
def inferred_finalize_merge_warning: () -> String
|
|
562
|
+
|
|
563
|
+
def collating_result?: () -> boolish
|
|
564
|
+
|
|
565
|
+
def final_result_process?: () -> boolish
|
|
566
|
+
end
|
|
567
|
+
end
|
|
568
|
+
|
|
569
|
+
|
|
570
|
+
module SimpleCov
|
|
571
|
+
module Configuration
|
|
572
|
+
type coverage_thresholds = Hash[Symbol, Numeric]
|
|
573
|
+
|
|
574
|
+
type missed_caps = Hash[Symbol, Integer]
|
|
575
|
+
|
|
576
|
+
@minimum_coverage: coverage_thresholds?
|
|
577
|
+
@maximum_coverage: coverage_thresholds?
|
|
578
|
+
@maximum_coverage_drop: coverage_thresholds?
|
|
579
|
+
@maximum_missed: missed_caps?
|
|
580
|
+
@maximum_missed_per_file: missed_caps?
|
|
581
|
+
@maximum_missed_per_file_overrides: Hash[String | Regexp, missed_caps]?
|
|
582
|
+
@minimum_coverage_by_file: coverage_thresholds?
|
|
583
|
+
@minimum_coverage_by_file_overrides: Hash[String | Regexp, coverage_thresholds]?
|
|
584
|
+
@minimum_coverage_by_group: Hash[String, coverage_thresholds]?
|
|
585
|
+
|
|
586
|
+
def minimum_coverage: (?(Numeric | coverage_thresholds)? coverage) -> coverage_thresholds
|
|
587
|
+
|
|
588
|
+
def raise_on_invalid_coverage: (coverage_thresholds coverage, (String | Symbol) coverage_setting) -> void
|
|
589
|
+
|
|
590
|
+
def maximum_coverage: (?(Numeric | coverage_thresholds)? coverage) -> coverage_thresholds
|
|
591
|
+
|
|
592
|
+
def expected_coverage: (?(Numeric | coverage_thresholds)? coverage) -> coverage_thresholds
|
|
593
|
+
|
|
594
|
+
def maximum_coverage_drop: (?(Numeric | coverage_thresholds)? coverage_drop) -> coverage_thresholds
|
|
595
|
+
|
|
596
|
+
def maximum_missed: (?(Numeric | missed_caps)? counts) -> missed_caps
|
|
597
|
+
|
|
598
|
+
def maximum_missed_per_file: (?(Numeric | missed_caps)? counts) -> missed_caps
|
|
599
|
+
|
|
600
|
+
def maximum_missed_per_file_overrides: () -> Hash[String | Regexp, missed_caps]
|
|
601
|
+
|
|
602
|
+
def minimum_coverage_by_file: () -> coverage_thresholds
|
|
603
|
+
| ((Numeric | Hash[Symbol | String | Regexp, Numeric | coverage_thresholds]) coverage) -> Hash[String | Regexp, coverage_thresholds]
|
|
604
|
+
|
|
605
|
+
def minimum_coverage_by_file_overrides: () -> Hash[String | Regexp, coverage_thresholds]
|
|
606
|
+
|
|
607
|
+
def minimum_coverage_by_group: () -> Hash[String, coverage_thresholds]
|
|
608
|
+
| (Hash[String, Numeric | coverage_thresholds] coverage) -> Hash[String, coverage_thresholds]
|
|
609
|
+
|
|
610
|
+
def refuse_coverage_drop: (*(criterion | :oneshot_line) criteria) -> coverage_thresholds
|
|
611
|
+
|
|
612
|
+
private
|
|
613
|
+
|
|
614
|
+
def normalized_threshold: ((Numeric | coverage_thresholds) coverage, String setting) -> coverage_thresholds
|
|
615
|
+
|
|
616
|
+
def normalized_missed_caps: ((Numeric | missed_caps) counts, String setting) -> missed_caps
|
|
617
|
+
|
|
618
|
+
def raise_on_invalid_missed_cap: (untyped cap, (String | Symbol) setting) -> void
|
|
619
|
+
|
|
620
|
+
def missed_per_file_replacement: ((Numeric | missed_caps) counts) -> String
|
|
621
|
+
|
|
622
|
+
def partition_per_file_thresholds: (Hash[Symbol | String | Regexp, Numeric | coverage_thresholds] coverage) -> [coverage_thresholds, Hash[String | Regexp, coverage_thresholds]]
|
|
623
|
+
|
|
624
|
+
def validate_per_file_key: ((Symbol | String | Regexp) key) -> void
|
|
625
|
+
|
|
626
|
+
def minimum_possible_coverage_exceeded: ((String | Symbol) coverage_option) -> void
|
|
627
|
+
|
|
628
|
+
def per_file_coverage_replacement: (coverage_thresholds defaults, Hash[String | Regexp, coverage_thresholds] overrides) -> String
|
|
629
|
+
|
|
630
|
+
def per_group_coverage_replacement: (Hash[String, Numeric | coverage_thresholds] coverage) -> String
|
|
631
|
+
|
|
632
|
+
def render_coverage_blocks: (Hash[Symbol, Array[String]] by_criterion) -> String
|
|
633
|
+
end
|
|
634
|
+
end
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
module SimpleCov
|
|
638
|
+
class Result
|
|
639
|
+
extend Forwardable
|
|
640
|
+
include Serialization
|
|
641
|
+
|
|
642
|
+
attr_reader original_result: Hash[String, untyped]
|
|
643
|
+
|
|
644
|
+
attr_reader tracked_files: Array[String]
|
|
645
|
+
attr_reader run_id: String?
|
|
646
|
+
attr_reader worker_id: String?
|
|
647
|
+
attr_reader files: FileList
|
|
648
|
+
alias source_files files
|
|
649
|
+
attr_reader contexts: ContextMap?
|
|
650
|
+
attr_writer created_at (): Time
|
|
651
|
+
attr_writer command_name (): String
|
|
652
|
+
attr_writer command_names (): Array[String]
|
|
653
|
+
|
|
654
|
+
@created_at: Time?
|
|
655
|
+
@command_name: String?
|
|
656
|
+
@command_names: Array[String]?
|
|
657
|
+
@groups_config: Hash[String, Filter[untyped]]
|
|
658
|
+
@groups: Hash[String, FileList]?
|
|
659
|
+
|
|
660
|
+
class FilterConfig
|
|
661
|
+
attr_reader filters: Array[Filter[untyped]]
|
|
662
|
+
attr_reader cover_filters: Array[Filter[untyped]]
|
|
663
|
+
attr_reader groups: Hash[String, Filter[untyped]]
|
|
664
|
+
|
|
665
|
+
def initialize: (?filters: Array[Filter[untyped]], ?cover_filters: Array[Filter[untyped]], ?groups: Hash[String, Filter[untyped]]) -> void
|
|
666
|
+
end
|
|
667
|
+
|
|
668
|
+
def initialize: (Hash[String, untyped] original_result, ?command_name: String?, ?created_at: Time?, ?not_loaded_files: Set[String], ?tracked_files: _ToA[String]?, ?run_id: String?, ?worker_id: String?, ?contexts: ContextMap?, ?report: bool, ?filter_config: FilterConfig) -> void
|
|
669
|
+
|
|
670
|
+
def filenames: () -> Array[String]
|
|
671
|
+
def source_file_for: (String path) -> SourceFile?
|
|
672
|
+
def coverage_for: (String path) -> Hash[criterion, CoverageStatistics]?
|
|
673
|
+
def groups: () -> Hash[String, FileList]
|
|
674
|
+
def configured_group?: (String group_name) -> bool
|
|
675
|
+
def format!: () -> untyped
|
|
676
|
+
def created_at: () -> Time
|
|
677
|
+
def command_name: () -> String
|
|
678
|
+
def command_names: () -> Array[String]
|
|
679
|
+
def self.from_hash: (Hash[String, untyped] hash) -> Array[Result]
|
|
680
|
+
|
|
681
|
+
def covered_percent: (?criterion) -> Float?
|
|
682
|
+
def covered_percentages: () -> Array[Float?]
|
|
683
|
+
def least_covered_file: () -> String?
|
|
684
|
+
def covered_strength: (?criterion) -> Float?
|
|
685
|
+
def covered_lines: () -> Integer?
|
|
686
|
+
def missed_lines: () -> Integer?
|
|
687
|
+
def total_branches: () -> Integer?
|
|
688
|
+
def covered_branches: () -> Integer?
|
|
689
|
+
def missed_branches: () -> Integer?
|
|
690
|
+
def total_methods: () -> Integer?
|
|
691
|
+
def covered_methods: () -> Integer?
|
|
692
|
+
def missed_methods: () -> Integer?
|
|
693
|
+
def coverage_statistics: () -> Hash[criterion, CoverageStatistics]
|
|
694
|
+
| (criterion) -> CoverageStatistics?
|
|
695
|
+
def coverage_statistics_by_file: () -> Hash[criterion, Array[CoverageStatistics]]
|
|
696
|
+
def total_lines: () -> Integer?
|
|
697
|
+
|
|
698
|
+
private
|
|
699
|
+
|
|
700
|
+
def initialize_resultset_metadata: (_ToA[String]? tracked_files, String? run_id, String? worker_id, ContextMap? contexts) -> void
|
|
701
|
+
def warn_about_missing_source_files: (Array[String] missing) -> void
|
|
702
|
+
def apply_filters!: (Array[Filter[untyped]] filters) -> void
|
|
703
|
+
def apply_cover_filters!: (Array[Filter[untyped]] cover_filters) -> void
|
|
704
|
+
end
|
|
705
|
+
|
|
706
|
+
class Result
|
|
707
|
+
interface _SerializableResult
|
|
708
|
+
def original_result: () -> Hash[String, untyped]
|
|
709
|
+
|
|
710
|
+
def created_at: () -> Time
|
|
711
|
+
|
|
712
|
+
def command_name: () -> String
|
|
713
|
+
|
|
714
|
+
def run_id: () -> String?
|
|
715
|
+
|
|
716
|
+
def worker_id: () -> String?
|
|
717
|
+
|
|
718
|
+
def tracked_files: () -> Array[String]
|
|
719
|
+
|
|
720
|
+
def contexts: () -> ContextMap?
|
|
721
|
+
|
|
722
|
+
def filenames: () -> Array[String]
|
|
723
|
+
end
|
|
724
|
+
|
|
725
|
+
module Serialization : _SerializableResult
|
|
726
|
+
def to_hash: () -> Hash[String, Hash[String, untyped]]
|
|
727
|
+
|
|
728
|
+
private
|
|
729
|
+
|
|
730
|
+
def append_contexts: (Hash[String, untyped] data) -> void
|
|
731
|
+
|
|
732
|
+
def context_filenames: () -> Set[String]
|
|
733
|
+
|
|
734
|
+
def coverage: () -> Hash[String, untyped]
|
|
735
|
+
end
|
|
736
|
+
end
|
|
737
|
+
end
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
module SimpleCov
|
|
741
|
+
class FileList
|
|
742
|
+
include Enumerable[SimpleCov::SourceFile]
|
|
743
|
+
extend Forwardable
|
|
744
|
+
|
|
745
|
+
def initialize: (Array[SourceFile] files) -> void
|
|
746
|
+
|
|
747
|
+
@files: Array[SourceFile]
|
|
748
|
+
@coverage_statistics: Hash[criterion, CoverageStatistics]?
|
|
749
|
+
@coverage_statistics_by_file: Hash[criterion, Array[CoverageStatistics]]?
|
|
750
|
+
|
|
751
|
+
def each: () { (SourceFile) -> void } -> void
|
|
752
|
+
| () -> Enumerator[SourceFile, untyped]
|
|
753
|
+
def size: () -> Integer
|
|
754
|
+
def length: () -> Integer
|
|
755
|
+
def map: [U] () { (SourceFile) -> U } -> Array[U]
|
|
756
|
+
def count: () -> Integer
|
|
757
|
+
| (untyped) -> Integer
|
|
758
|
+
| () { (SourceFile) -> boolish } -> Integer
|
|
759
|
+
def empty?: () -> bool
|
|
760
|
+
def to_a: () -> Array[SourceFile]
|
|
761
|
+
def to_ary: () -> Array[SourceFile]
|
|
762
|
+
|
|
763
|
+
def coverage_statistics: () -> Hash[criterion, CoverageStatistics]
|
|
764
|
+
| (criterion) -> CoverageStatistics?
|
|
765
|
+
def coverage_statistics_by_file: () -> Hash[criterion, Array[CoverageStatistics]]
|
|
766
|
+
|
|
767
|
+
def covered_lines: () -> Integer?
|
|
768
|
+
def missed_lines: () -> Integer?
|
|
769
|
+
def never_lines: () -> Integer
|
|
770
|
+
def skipped_lines: () -> Integer
|
|
771
|
+
def covered_percentages: () -> Array[Float?]
|
|
772
|
+
def least_covered_file: () -> String?
|
|
773
|
+
def lines_of_code: () -> Integer?
|
|
774
|
+
def covered_percent: (?criterion) -> Float?
|
|
775
|
+
def covered_strength: (?criterion) -> Float?
|
|
776
|
+
|
|
777
|
+
def total_branches: () -> Integer?
|
|
778
|
+
def covered_branches: () -> Integer?
|
|
779
|
+
def missed_branches: () -> Integer?
|
|
780
|
+
def branch_covered_percent: () -> Float?
|
|
781
|
+
|
|
782
|
+
def total_methods: () -> Integer?
|
|
783
|
+
def covered_methods: () -> Integer?
|
|
784
|
+
def missed_methods: () -> Integer?
|
|
785
|
+
def method_covered_percent: () -> Float?
|
|
786
|
+
|
|
787
|
+
private
|
|
788
|
+
|
|
789
|
+
def compute_coverage_statistics_by_file: () -> Hash[criterion, Array[CoverageStatistics]]
|
|
790
|
+
def compute_coverage_statistics: () -> Hash[criterion, CoverageStatistics]
|
|
791
|
+
def enabled_criteria_for_reporting: () -> Array[criterion]
|
|
792
|
+
end
|
|
793
|
+
end
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
module SimpleCov
|
|
797
|
+
class SourceFile
|
|
798
|
+
include BuilderContext
|
|
799
|
+
|
|
800
|
+
attr_reader filename: String
|
|
801
|
+
attr_reader coverage_data: Hash[String, untyped]
|
|
802
|
+
|
|
803
|
+
def initialize: (String filename, Hash[String, untyped] coverage_data, ?loaded: bool) -> void
|
|
804
|
+
|
|
805
|
+
@loaded: bool
|
|
806
|
+
@src: Array[String]?
|
|
807
|
+
@coverage_statistics: Hash[criterion, CoverageStatistics]?
|
|
808
|
+
@lines: Array[Line]?
|
|
809
|
+
@covered_lines: Array[Line]?
|
|
810
|
+
@missed_lines: Array[Line]?
|
|
811
|
+
@never_lines: Array[Line]?
|
|
812
|
+
@skipped_lines: Array[Line]?
|
|
813
|
+
@branches: Array[Branch]?
|
|
814
|
+
@total_branches: Array[Branch]?
|
|
815
|
+
@branches_report: Hash[Integer, Array[[ Symbol, Integer ]]]?
|
|
816
|
+
@covered_branches: Array[Branch]?
|
|
817
|
+
@missed_branches: Array[Branch]?
|
|
818
|
+
@methods: Array[Method]?
|
|
819
|
+
@covered_methods: Array[Method]?
|
|
820
|
+
@missed_methods: Array[Method]?
|
|
821
|
+
|
|
822
|
+
def project_filename: () -> String
|
|
823
|
+
def src: () -> Array[String]
|
|
824
|
+
alias source src
|
|
825
|
+
|
|
826
|
+
def coverage_statistics: () -> Hash[criterion, CoverageStatistics]
|
|
827
|
+
| (criterion) -> CoverageStatistics?
|
|
828
|
+
|
|
829
|
+
def lines: () -> Array[Line]
|
|
830
|
+
alias source_lines lines
|
|
831
|
+
def covered_lines: () -> Array[Line]
|
|
832
|
+
def missed_lines: () -> Array[Line]
|
|
833
|
+
def never_lines: () -> Array[Line]
|
|
834
|
+
def skipped_lines: () -> Array[Line]
|
|
835
|
+
def lines_of_code: () -> Integer
|
|
836
|
+
def line: (Integer number) -> Line?
|
|
837
|
+
def covered_percent: (?criterion) -> Float?
|
|
838
|
+
def covered_strength: (?criterion) -> Float?
|
|
839
|
+
def no_lines?: () -> bool
|
|
840
|
+
def relevant_lines: () -> Integer
|
|
841
|
+
|
|
842
|
+
def branches: () -> Array[Branch]
|
|
843
|
+
def no_branches?: () -> bool
|
|
844
|
+
def branches_coverage_percent: () -> Float?
|
|
845
|
+
def total_branches: () -> Array[Branch]
|
|
846
|
+
def branches_report: () -> Hash[Integer, Array[[ Symbol, Integer ]]]
|
|
847
|
+
def covered_branches: () -> Array[Branch]
|
|
848
|
+
def missed_branches: () -> Array[Branch]
|
|
849
|
+
def branches_for_line: (Integer line_number) -> Array[[ Symbol, Integer ]]
|
|
850
|
+
def line_with_missed_branch?: (Integer line_number) -> bool
|
|
851
|
+
|
|
852
|
+
def methods: () -> Array[Method]
|
|
853
|
+
def covered_methods: () -> Array[Method]
|
|
854
|
+
def missed_methods: () -> Array[Method]
|
|
855
|
+
def methods_coverage_percent: () -> Float?
|
|
856
|
+
|
|
857
|
+
def not_loaded?: () -> bool
|
|
858
|
+
end
|
|
859
|
+
end
|
|
860
|
+
|
|
861
|
+
|
|
862
|
+
module SimpleCov
|
|
863
|
+
class SourceFile
|
|
864
|
+
class Line
|
|
865
|
+
attr_reader src: String
|
|
866
|
+
attr_reader line_number: Integer
|
|
867
|
+
attr_reader coverage: Integer?
|
|
868
|
+
attr_reader skipped: bool
|
|
869
|
+
|
|
870
|
+
alias source src
|
|
871
|
+
alias line line_number
|
|
872
|
+
alias number line_number
|
|
873
|
+
|
|
874
|
+
def initialize: (String src, Integer line_number, Integer? coverage) -> void
|
|
875
|
+
|
|
876
|
+
def missed?: () -> bool
|
|
877
|
+
def covered?: () -> bool
|
|
878
|
+
def never?: () -> bool
|
|
879
|
+
def skipped!: () -> void
|
|
880
|
+
def skipped?: () -> bool
|
|
881
|
+
def status: () -> String
|
|
882
|
+
end
|
|
883
|
+
end
|
|
884
|
+
end
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
module SimpleCov
|
|
888
|
+
class SourceFile
|
|
889
|
+
class Branch
|
|
890
|
+
attr_reader start_line: Integer
|
|
891
|
+
attr_reader end_line: Integer
|
|
892
|
+
attr_reader coverage: Integer
|
|
893
|
+
attr_reader type: Symbol
|
|
894
|
+
|
|
895
|
+
@inline: bool
|
|
896
|
+
@skipped: bool
|
|
897
|
+
|
|
898
|
+
def initialize: (start_line: Integer, end_line: Integer, coverage: Integer, inline: bool, type: Symbol) -> void
|
|
899
|
+
|
|
900
|
+
def inline?: () -> bool
|
|
901
|
+
def covered?: () -> bool
|
|
902
|
+
def missed?: () -> bool
|
|
903
|
+
def report_line: () -> Integer
|
|
904
|
+
def skipped!: () -> void
|
|
905
|
+
def skipped?: () -> bool
|
|
906
|
+
def overlaps_with?: (Range[Integer] line_range) -> bool
|
|
907
|
+
def report: () -> [ Symbol, Integer ]
|
|
908
|
+
end
|
|
909
|
+
end
|
|
910
|
+
end
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
module SimpleCov
|
|
914
|
+
class SourceFile
|
|
915
|
+
class Method
|
|
916
|
+
attr_reader source_file: SourceFile
|
|
917
|
+
attr_reader coverage: Integer
|
|
918
|
+
attr_reader class_name: Module | String
|
|
919
|
+
attr_reader method_name: Symbol | String
|
|
920
|
+
attr_reader start_line: Integer?
|
|
921
|
+
attr_reader start_col: Integer?
|
|
922
|
+
attr_reader end_line: Integer?
|
|
923
|
+
attr_reader end_col: Integer?
|
|
924
|
+
|
|
925
|
+
@skipped: bool
|
|
926
|
+
@lines: Array[Line]?
|
|
927
|
+
|
|
928
|
+
def initialize: (SourceFile source_file, [ Module | String, Symbol | String, Integer?, Integer?, Integer?, Integer? ] info, Integer coverage) -> void
|
|
929
|
+
|
|
930
|
+
def covered?: () -> bool
|
|
931
|
+
def skipped?: () -> bool
|
|
932
|
+
def skipped!: () -> void
|
|
933
|
+
def missed?: () -> bool
|
|
934
|
+
def lines: () -> Array[Line]
|
|
935
|
+
def overlaps_with?: (Range[Integer] line_range) -> bool
|
|
936
|
+
def to_s: () -> String
|
|
937
|
+
end
|
|
938
|
+
end
|
|
939
|
+
end
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
module SimpleCov
|
|
943
|
+
class SourceFile
|
|
944
|
+
class Statistics
|
|
945
|
+
@source_file: SourceFile
|
|
946
|
+
|
|
947
|
+
def initialize: (SourceFile source_file) -> void
|
|
948
|
+
|
|
949
|
+
def call: () -> Hash[criterion, CoverageStatistics]
|
|
950
|
+
|
|
951
|
+
private
|
|
952
|
+
|
|
953
|
+
def line_statistics: () -> Hash[criterion, CoverageStatistics]
|
|
954
|
+
|
|
955
|
+
def branch_statistics: () -> Hash[criterion, CoverageStatistics]
|
|
956
|
+
|
|
957
|
+
def method_statistics: () -> Hash[criterion, CoverageStatistics]
|
|
958
|
+
|
|
959
|
+
def unaccounted?: (SourceFile source_file, String table) -> bool
|
|
960
|
+
|
|
961
|
+
def coverage_statistics: (Array[Line | Branch | Method] covered, Array[Line | Branch | Method] missed, ?omitted: Integer, ?percent: Float?) -> CoverageStatistics
|
|
962
|
+
end
|
|
963
|
+
end
|
|
964
|
+
end
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
module SimpleCov
|
|
968
|
+
class SourceFile
|
|
969
|
+
module BuilderContext
|
|
970
|
+
type real_positions = { branches: Set[Integer], methods: Set[[untyped, Integer]] }
|
|
971
|
+
|
|
972
|
+
@skip_chunks: SkipChunks?
|
|
973
|
+
@real_source_positions: real_positions?
|
|
974
|
+
|
|
975
|
+
def skip_chunks_for: (criterion) -> Array[Range[Integer]]
|
|
976
|
+
|
|
977
|
+
def real_source_positions: () -> real_positions?
|
|
978
|
+
|
|
979
|
+
def filename: () -> String
|
|
980
|
+
def src: () -> Array[String]
|
|
981
|
+
end
|
|
982
|
+
end
|
|
983
|
+
end
|
|
984
|
+
|
|
985
|
+
|
|
986
|
+
module SimpleCov
|
|
987
|
+
class CoverageStatistics
|
|
988
|
+
ZERO_STATS: [Integer, Integer, Integer, Float]
|
|
989
|
+
|
|
990
|
+
attr_reader total: Integer
|
|
991
|
+
attr_reader covered: Integer
|
|
992
|
+
attr_reader missed: Integer
|
|
993
|
+
attr_reader omitted: Integer
|
|
994
|
+
attr_reader strength: Float
|
|
995
|
+
attr_reader percent: Float
|
|
996
|
+
|
|
997
|
+
def self.from: (Array[CoverageStatistics] coverage_statistics) -> CoverageStatistics
|
|
998
|
+
|
|
999
|
+
def initialize: (covered: Integer, missed: Integer, ?omitted: Integer, ?total_strength: Integer | Float, ?percent: Float?) -> void
|
|
1000
|
+
|
|
1001
|
+
private
|
|
1002
|
+
|
|
1003
|
+
def compute_percent: (Integer covered, Integer missed, Integer total) -> Float
|
|
1004
|
+
def compute_strength: (Integer | Float total_strength, Integer total) -> Float
|
|
1005
|
+
end
|
|
1006
|
+
end
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
module SimpleCov
|
|
1010
|
+
module LastRun
|
|
1011
|
+
def self.last_run_path: () -> String
|
|
1012
|
+
|
|
1013
|
+
def self.read: () -> Hash[Symbol, untyped]?
|
|
1014
|
+
|
|
1015
|
+
def self.write: (Hash[Symbol, untyped] json) -> void
|
|
1016
|
+
|
|
1017
|
+
def self.invalid_last_run: () -> nil
|
|
1018
|
+
end
|
|
1019
|
+
end
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
module SimpleCov
|
|
1023
|
+
class Filter[T]
|
|
1024
|
+
attr_reader filter_argument: T
|
|
1025
|
+
|
|
1026
|
+
def initialize: (T filter_argument) -> void
|
|
1027
|
+
|
|
1028
|
+
def matches?: (SourceFile source_file) -> boolish
|
|
1029
|
+
|
|
1030
|
+
def path_only?: () -> bool
|
|
1031
|
+
|
|
1032
|
+
def self.build_filter: (filter_arg filter_argument, ?string_filter: singleton(Filter)) -> Filter[untyped]
|
|
1033
|
+
|
|
1034
|
+
def self.class_for_argument: (filter_arg filter_argument) -> singleton(Filter)
|
|
1035
|
+
|
|
1036
|
+
self.@filter_classes_by_argument_type: Hash[Class, singleton(Filter)]?
|
|
1037
|
+
|
|
1038
|
+
def self.filter_classes_by_argument_type: () -> Hash[Class, singleton(Filter)]
|
|
1039
|
+
end
|
|
1040
|
+
|
|
1041
|
+
class StringFilter < Filter[String]
|
|
1042
|
+
def matches?: (SourceFile source_file) -> bool
|
|
1043
|
+
|
|
1044
|
+
def path_only?: () -> bool
|
|
1045
|
+
|
|
1046
|
+
private
|
|
1047
|
+
|
|
1048
|
+
@segment_pattern: Regexp?
|
|
1049
|
+
|
|
1050
|
+
def segment_pattern: () -> Regexp
|
|
1051
|
+
|
|
1052
|
+
def compute_segment_pattern: () -> Regexp
|
|
1053
|
+
end
|
|
1054
|
+
|
|
1055
|
+
class RegexFilter < Filter[Regexp]
|
|
1056
|
+
def matches?: (SourceFile source_file) -> bool
|
|
1057
|
+
|
|
1058
|
+
def path_only?: () -> bool
|
|
1059
|
+
end
|
|
1060
|
+
|
|
1061
|
+
class BlockFilter < Filter[^(SourceFile) -> boolish]
|
|
1062
|
+
def matches?: (SourceFile source_file) -> boolish
|
|
1063
|
+
|
|
1064
|
+
def path_only?: () -> bool
|
|
1065
|
+
end
|
|
1066
|
+
|
|
1067
|
+
class GlobFilter < Filter[String]
|
|
1068
|
+
def matches?: (SourceFile source_file) -> bool
|
|
1069
|
+
|
|
1070
|
+
def path_only?: () -> bool
|
|
1071
|
+
end
|
|
1072
|
+
|
|
1073
|
+
class ArrayFilter < Filter[Array[Filter[untyped]]]
|
|
1074
|
+
def initialize: (Array[filter_arg] filter_argument) -> void
|
|
1075
|
+
|
|
1076
|
+
def matches?: (SourceFile source_file) -> boolish
|
|
1077
|
+
|
|
1078
|
+
def path_only?: () -> bool
|
|
1079
|
+
end
|
|
1080
|
+
end
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
module SimpleCov
|
|
1084
|
+
module Formatter
|
|
1085
|
+
interface _Formatter
|
|
1086
|
+
def format: (SimpleCov::Result result) -> untyped
|
|
1087
|
+
end
|
|
1088
|
+
|
|
1089
|
+
def self.instance_for: (untyped formatter) -> untyped
|
|
1090
|
+
|
|
1091
|
+
def self.instantiable?: (untyped formatter) -> bool
|
|
1092
|
+
|
|
1093
|
+
def self.format: (untyped formatter, SimpleCov::Result result) -> untyped
|
|
1094
|
+
end
|
|
1095
|
+
end
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
module SimpleCov
|
|
1099
|
+
module Formatter
|
|
1100
|
+
class Base
|
|
1101
|
+
@silent: bool
|
|
1102
|
+
@output_dir: String?
|
|
1103
|
+
|
|
1104
|
+
def initialize: (?silent: bool, ?output_dir: String?) -> void
|
|
1105
|
+
|
|
1106
|
+
private
|
|
1107
|
+
|
|
1108
|
+
def message_prefix: () -> String
|
|
1109
|
+
|
|
1110
|
+
def output_path: () -> String
|
|
1111
|
+
|
|
1112
|
+
def displayable_output_path: () -> String
|
|
1113
|
+
|
|
1114
|
+
def relative_or_absolute_output_path: () -> String
|
|
1115
|
+
|
|
1116
|
+
def entry_point_filename: () -> String?
|
|
1117
|
+
|
|
1118
|
+
def emit_status: (untyped result) -> void
|
|
1119
|
+
|
|
1120
|
+
def output_message: (untyped result) -> String
|
|
1121
|
+
|
|
1122
|
+
def stats_line: (Symbol criterion, SimpleCov::CoverageStatistics stat) -> String?
|
|
1123
|
+
end
|
|
1124
|
+
end
|
|
1125
|
+
end
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
module SimpleCov
|
|
1129
|
+
module Formatter
|
|
1130
|
+
class SimpleFormatter
|
|
1131
|
+
def format: (SimpleCov::Result result) -> String
|
|
1132
|
+
|
|
1133
|
+
private
|
|
1134
|
+
|
|
1135
|
+
def format_group: (String name, SimpleCov::FileList files, SimpleCov::criterion criterion) -> String
|
|
1136
|
+
end
|
|
1137
|
+
end
|
|
1138
|
+
end
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
module SimpleCov
|
|
1142
|
+
module Formatter
|
|
1143
|
+
class MultiFormatter
|
|
1144
|
+
module InstanceMethods
|
|
1145
|
+
def format: (SimpleCov::Result result) -> Array[untyped]
|
|
1146
|
+
|
|
1147
|
+
def formatters: () -> Array[untyped]
|
|
1148
|
+
end
|
|
1149
|
+
|
|
1150
|
+
def self.new: (?untyped formatters) -> Class
|
|
1151
|
+
end
|
|
1152
|
+
end
|
|
1153
|
+
end
|
|
1154
|
+
|
|
1155
|
+
|
|
1156
|
+
module SimpleCov
|
|
1157
|
+
module Formatter
|
|
1158
|
+
class HTMLFormatter < Base
|
|
1159
|
+
DATA_MARKER: "<!-- SIMPLECOV_COVERAGE_DATA -->"
|
|
1160
|
+
|
|
1161
|
+
LEGACY_REPORT_FILES: Array[String]
|
|
1162
|
+
|
|
1163
|
+
def format: (SimpleCov::Result result) -> void
|
|
1164
|
+
|
|
1165
|
+
def format_from_json: (String json_path, String output_dir) -> void
|
|
1166
|
+
|
|
1167
|
+
private
|
|
1168
|
+
|
|
1169
|
+
def entry_point_filename: () -> String
|
|
1170
|
+
|
|
1171
|
+
def source_less_hash: (Hash[Symbol, untyped] hash) -> Hash[Symbol, untyped]
|
|
1172
|
+
|
|
1173
|
+
def write_report_files: (Hash[untyped, untyped] json_hash, Hash[untyped, untyped] viewer_hash, SimpleCov::Result result) -> void
|
|
1174
|
+
|
|
1175
|
+
def render_report: (String json) -> String
|
|
1176
|
+
|
|
1177
|
+
def public_dir: () -> String
|
|
1178
|
+
end
|
|
1179
|
+
end
|
|
1180
|
+
end
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
module SimpleCov
|
|
1184
|
+
module Formatter
|
|
1185
|
+
class BaselineFormatter < Base
|
|
1186
|
+
def format: (SimpleCov::Result result) -> void
|
|
1187
|
+
|
|
1188
|
+
private
|
|
1189
|
+
|
|
1190
|
+
def ratchet: (SimpleCov::Result result) -> String
|
|
1191
|
+
|
|
1192
|
+
def generate: (Baseline::current_floors current) -> String
|
|
1193
|
+
|
|
1194
|
+
def summary: (Baseline::Outcome outcome, bool changed) -> String
|
|
1195
|
+
|
|
1196
|
+
def below_floors: (Array[String] regressed) -> String
|
|
1197
|
+
|
|
1198
|
+
def current_floors: (SimpleCov::Result result) -> Baseline::current_floors
|
|
1199
|
+
|
|
1200
|
+
def measured_criteria: () -> Array[Symbol]
|
|
1201
|
+
|
|
1202
|
+
def floor_of: (untyped file, Symbol criterion) -> { percent: Numeric, missed: Integer }
|
|
1203
|
+
|
|
1204
|
+
def write: (Baseline baseline) -> void
|
|
1205
|
+
|
|
1206
|
+
def output_path: () -> String
|
|
1207
|
+
|
|
1208
|
+
def output_message: (untyped message) -> String
|
|
1209
|
+
end
|
|
1210
|
+
end
|
|
1211
|
+
end
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
module SimpleCov
|
|
1215
|
+
module Formatter
|
|
1216
|
+
module CoverageJSONWriter
|
|
1217
|
+
FILENAME: "coverage.json"
|
|
1218
|
+
|
|
1219
|
+
META_SCAN_BYTES: Integer
|
|
1220
|
+
|
|
1221
|
+
def self?.write: (untyped output_path, Hash[Symbol, untyped] hash, SimpleCov::Result result) -> String
|
|
1222
|
+
|
|
1223
|
+
def self?.warn_if_concurrent_overwrite: (String path, SimpleCov::Result result) -> void
|
|
1224
|
+
|
|
1225
|
+
def self?.existing_meta: (String path) -> ({ timestamp: untyped, command_name: untyped })?
|
|
1226
|
+
|
|
1227
|
+
def self?.parse_time: (untyped value) -> untyped
|
|
1228
|
+
|
|
1229
|
+
def self?.parse_meta: (String path) -> Hash[Symbol, untyped]?
|
|
1230
|
+
|
|
1231
|
+
def self?.parse_meta_head: (String path) -> Hash[Symbol, untyped]?
|
|
1232
|
+
|
|
1233
|
+
def self?.parse_meta_full: (String path) -> Hash[Symbol, untyped]?
|
|
1234
|
+
end
|
|
1235
|
+
end
|
|
1236
|
+
end
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
module SimpleCov
|
|
1240
|
+
module Formatter
|
|
1241
|
+
class JSONFormatter < Base
|
|
1242
|
+
FILENAME: "coverage.json"
|
|
1243
|
+
|
|
1244
|
+
def self.build_hash: (SimpleCov::Result result, ?include_source: bool) -> Hash[Symbol, untyped]
|
|
1245
|
+
|
|
1246
|
+
def format: (SimpleCov::Result result) -> void
|
|
1247
|
+
|
|
1248
|
+
private
|
|
1249
|
+
|
|
1250
|
+
def message_prefix: () -> String
|
|
1251
|
+
|
|
1252
|
+
def entry_point_filename: () -> String
|
|
1253
|
+
end
|
|
1254
|
+
end
|
|
1255
|
+
end
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
module SimpleCov
|
|
1259
|
+
module ExitCodes
|
|
1260
|
+
SUCCESS: 0
|
|
1261
|
+
|
|
1262
|
+
EXCEPTION: 1
|
|
1263
|
+
|
|
1264
|
+
MINIMUM_COVERAGE: 2
|
|
1265
|
+
|
|
1266
|
+
MAXIMUM_COVERAGE_DROP: 3
|
|
1267
|
+
|
|
1268
|
+
MAXIMUM_COVERAGE: 4
|
|
1269
|
+
|
|
1270
|
+
UNITS: Hash[Symbol, String]
|
|
1271
|
+
|
|
1272
|
+
def self.print_error: (String message) -> void
|
|
1273
|
+
end
|
|
1274
|
+
end
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
module SimpleCov
|
|
1278
|
+
module ExitCodes
|
|
1279
|
+
interface _CoverageLimits
|
|
1280
|
+
def minimum_coverage: () -> Hash[Symbol, Numeric]
|
|
1281
|
+
|
|
1282
|
+
def minimum_coverage_by_file: () -> Hash[Symbol, Numeric]
|
|
1283
|
+
|
|
1284
|
+
def minimum_coverage_by_file_overrides: () -> untyped
|
|
1285
|
+
|
|
1286
|
+
def minimum_coverage_by_group: () -> untyped
|
|
1287
|
+
|
|
1288
|
+
def maximum_coverage: () -> Hash[Symbol, Numeric]
|
|
1289
|
+
|
|
1290
|
+
def maximum_coverage_drop: () -> Hash[Symbol, Numeric]
|
|
1291
|
+
|
|
1292
|
+
def maximum_missed: () -> Hash[Symbol, Integer]
|
|
1293
|
+
|
|
1294
|
+
def maximum_missed_per_file: () -> Hash[Symbol, Integer]
|
|
1295
|
+
|
|
1296
|
+
def maximum_missed_per_file_overrides: () -> untyped
|
|
1297
|
+
|
|
1298
|
+
def baseline: () -> Baseline?
|
|
1299
|
+
end
|
|
1300
|
+
|
|
1301
|
+
module ExitCodeHandling
|
|
1302
|
+
def self?.call: (SimpleCov::Result result, coverage_limits: _CoverageLimits) -> Integer
|
|
1303
|
+
|
|
1304
|
+
def self?.coverage_checks: (SimpleCov::Result result, _CoverageLimits coverage_limits) -> Array[untyped]
|
|
1305
|
+
|
|
1306
|
+
def self?.minimum_by_file_check: (SimpleCov::Result result, _CoverageLimits coverage_limits) -> untyped
|
|
1307
|
+
|
|
1308
|
+
def self?.maximum_missed_per_file_check: (SimpleCov::Result result, _CoverageLimits coverage_limits) -> untyped
|
|
1309
|
+
end
|
|
1310
|
+
end
|
|
1311
|
+
end
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
module SimpleCov
|
|
1315
|
+
module History
|
|
1316
|
+
ENVELOPE: String
|
|
1317
|
+
|
|
1318
|
+
FORMAT_VERSION: Integer
|
|
1319
|
+
|
|
1320
|
+
type entry = Hash[String, untyped]
|
|
1321
|
+
|
|
1322
|
+
def self.history_path: () -> String
|
|
1323
|
+
|
|
1324
|
+
def self.record: (SimpleCov::Result result) -> void
|
|
1325
|
+
|
|
1326
|
+
def self.read: () -> Array[entry]
|
|
1327
|
+
|
|
1328
|
+
def self.entries_with: (SimpleCov::Result result) -> Array[entry]
|
|
1329
|
+
|
|
1330
|
+
def self.git_info: () -> [String?, String?]
|
|
1331
|
+
|
|
1332
|
+
private
|
|
1333
|
+
|
|
1334
|
+
def self.entry_for: (SimpleCov::Result result) -> entry
|
|
1335
|
+
|
|
1336
|
+
def self.measured_percents: (untyped stats_source) -> Hash[String, Numeric]
|
|
1337
|
+
|
|
1338
|
+
def self.files_percents: (SimpleCov::Result result) -> Hash[String, Hash[String, Numeric]]
|
|
1339
|
+
|
|
1340
|
+
def self.write: (Array[entry] entries) -> void
|
|
1341
|
+
|
|
1342
|
+
def self.invalid_history: () -> Array[entry]
|
|
1343
|
+
|
|
1344
|
+
def self.git: (*String args) -> String?
|
|
1345
|
+
end
|
|
1346
|
+
end
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
module SimpleCov
|
|
1350
|
+
module Configuration
|
|
1351
|
+
DROP_BASELINES: Array[Symbol]
|
|
1352
|
+
|
|
1353
|
+
@history_limit: Integer?
|
|
1354
|
+
|
|
1355
|
+
@drop_baseline: Symbol?
|
|
1356
|
+
|
|
1357
|
+
def history_limit: (?Integer? limit) -> Integer
|
|
1358
|
+
|
|
1359
|
+
def history_limit=: (Integer limit) -> Integer
|
|
1360
|
+
|
|
1361
|
+
def drop_baseline: (?Symbol? mode) -> Symbol
|
|
1362
|
+
end
|
|
1363
|
+
end
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
module SimpleCov
|
|
1367
|
+
module Configuration
|
|
1368
|
+
@production_coverage: String?
|
|
1369
|
+
|
|
1370
|
+
def production_coverage: (?String? path) -> String?
|
|
1371
|
+
|
|
1372
|
+
def production_coverage=: (String path) -> String
|
|
1373
|
+
end
|
|
1374
|
+
end
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
module SimpleCov
|
|
1378
|
+
module Production
|
|
1379
|
+
class Error < StandardError
|
|
1380
|
+
end
|
|
1381
|
+
|
|
1382
|
+
interface _Sink
|
|
1383
|
+
def store: (Hash[String, Array[Integer]] coverage) -> untyped
|
|
1384
|
+
end
|
|
1385
|
+
|
|
1386
|
+
self.@running: bool?
|
|
1387
|
+
self.@pid: Integer?
|
|
1388
|
+
self.@started_coverage: bool?
|
|
1389
|
+
self.@root_prefix: String
|
|
1390
|
+
self.@sink: _Sink
|
|
1391
|
+
self.@flush_interval: Float | Integer
|
|
1392
|
+
self.@flush_jitter: Float | Integer
|
|
1393
|
+
self.@sample_rate: Float | Integer
|
|
1394
|
+
self.@max_buffered_lines: Integer
|
|
1395
|
+
self.@pending: Hash[String, Set[Integer]]
|
|
1396
|
+
self.@measuring: bool
|
|
1397
|
+
self.@mutex: Mutex
|
|
1398
|
+
self.@waiter: ConditionVariable
|
|
1399
|
+
self.@thread: Thread?
|
|
1400
|
+
self.@at_exit_installed: bool?
|
|
1401
|
+
|
|
1402
|
+
def self.start: (?root: String, ?sink: _Sink?, ?flush_interval: (Float | Integer),
|
|
1403
|
+
?flush_jitter: (Float | Integer)?, ?sample_rate: (Float | Integer),
|
|
1404
|
+
?max_buffered_lines: Integer) -> bool
|
|
1405
|
+
|
|
1406
|
+
def self.running?: () -> bool
|
|
1407
|
+
|
|
1408
|
+
def self.flush: () -> bool
|
|
1409
|
+
|
|
1410
|
+
def self.stop: () -> bool
|
|
1411
|
+
|
|
1412
|
+
def self.reset!: () -> void
|
|
1413
|
+
|
|
1414
|
+
private
|
|
1415
|
+
|
|
1416
|
+
def self.validate!: ((Float | Integer) flush_interval, (Float | Integer)? flush_jitter,
|
|
1417
|
+
(Float | Integer) sample_rate, Integer max_buffered_lines) -> void
|
|
1418
|
+
|
|
1419
|
+
def self.validate_jitter!: ((Float | Integer)? flush_jitter) -> void
|
|
1420
|
+
|
|
1421
|
+
def self.claim_coverage: () -> boolish
|
|
1422
|
+
|
|
1423
|
+
def self.oneshot_supported?: () -> bool
|
|
1424
|
+
|
|
1425
|
+
def self.configure: (String root, _Sink? sink, flush_interval: (Float | Integer),
|
|
1426
|
+
flush_jitter: (Float | Integer)?, sample_rate: (Float | Integer),
|
|
1427
|
+
max_buffered_lines: Integer) -> void
|
|
1428
|
+
|
|
1429
|
+
def self.default_sink: (String root) -> FileSink
|
|
1430
|
+
|
|
1431
|
+
def self.spawn_flush_thread: () -> void
|
|
1432
|
+
|
|
1433
|
+
def self.flush_loop: () -> void
|
|
1434
|
+
|
|
1435
|
+
def self.interval_with_jitter: () -> (Float | Integer)
|
|
1436
|
+
|
|
1437
|
+
def self.wake_flush_thread: () -> void
|
|
1438
|
+
|
|
1439
|
+
def self.cycle: () -> void
|
|
1440
|
+
|
|
1441
|
+
def self.resample: () -> void
|
|
1442
|
+
|
|
1443
|
+
def self.pull_pending: () -> void
|
|
1444
|
+
|
|
1445
|
+
def self.push_pending: () -> bool
|
|
1446
|
+
|
|
1447
|
+
def self.enforce_ceiling: () -> void
|
|
1448
|
+
|
|
1449
|
+
def self.relativize: (String path) -> String?
|
|
1450
|
+
|
|
1451
|
+
def self.warn_decline: (String reason) -> false
|
|
1452
|
+
|
|
1453
|
+
def self.install_at_exit: () -> void
|
|
1454
|
+
|
|
1455
|
+
end
|
|
1456
|
+
end
|
|
1457
|
+
|
|
1458
|
+
|
|
1459
|
+
module SimpleCov
|
|
1460
|
+
module Production
|
|
1461
|
+
class FileSink
|
|
1462
|
+
ENVELOPE: String
|
|
1463
|
+
|
|
1464
|
+
FORMAT_VERSION: Integer
|
|
1465
|
+
|
|
1466
|
+
attr_reader path: String
|
|
1467
|
+
|
|
1468
|
+
def initialize: (path: String) -> void
|
|
1469
|
+
|
|
1470
|
+
def store: (Hash[String, Array[Integer]] coverage) -> true
|
|
1471
|
+
|
|
1472
|
+
def self.read: (String path) -> Hash[String, untyped]
|
|
1473
|
+
|
|
1474
|
+
def self.parse: (String content, String path) -> Hash[String, untyped]
|
|
1475
|
+
|
|
1476
|
+
def self.envelope_of: (untyped document, String path) -> Hash[String, untyped]
|
|
1477
|
+
|
|
1478
|
+
private
|
|
1479
|
+
|
|
1480
|
+
def with_exclusive_lock: [T] () { (File file) -> T } -> T
|
|
1481
|
+
|
|
1482
|
+
def open_file: [T] (String name, Integer mode, Integer perm) { (File file) -> T } -> T
|
|
1483
|
+
|
|
1484
|
+
def rewrite: (File file, Hash[String, untyped] payload) -> void
|
|
1485
|
+
|
|
1486
|
+
def merge: (Hash[String, untyped] existing, Hash[String, Array[Integer]] incoming) -> Hash[String, untyped]
|
|
1487
|
+
|
|
1488
|
+
def envelope: (Hash[String, untyped] existing, Hash[String, Array[Integer]] incoming) -> Hash[String, untyped]
|
|
1489
|
+
end
|
|
1490
|
+
end
|
|
1491
|
+
end
|
|
1492
|
+
|
|
1493
|
+
|
|
1494
|
+
module SimpleCov
|
|
1495
|
+
class Baseline
|
|
1496
|
+
DEFAULT_FILENAME: String
|
|
1497
|
+
|
|
1498
|
+
class Floor
|
|
1499
|
+
attr_reader percent: Numeric
|
|
1500
|
+
attr_reader missed: Integer?
|
|
1501
|
+
|
|
1502
|
+
def initialize: (percent: Numeric, missed: Integer?) -> void
|
|
1503
|
+
end
|
|
1504
|
+
|
|
1505
|
+
class Outcome
|
|
1506
|
+
attr_reader baseline: Baseline
|
|
1507
|
+
attr_reader tightened: Array[String]
|
|
1508
|
+
attr_reader pruned: Array[String]
|
|
1509
|
+
attr_reader regressed: Array[String]
|
|
1510
|
+
attr_reader unchanged: Array[String]
|
|
1511
|
+
|
|
1512
|
+
def initialize: (baseline: Baseline, tightened: Array[String], pruned: Array[String],
|
|
1513
|
+
regressed: Array[String], unchanged: Array[String]) -> void
|
|
1514
|
+
end
|
|
1515
|
+
|
|
1516
|
+
type current_floors = Hash[String, Hash[Symbol, {percent: Numeric, missed: Integer}]]
|
|
1517
|
+
|
|
1518
|
+
def self.read_if_exists: (String path) -> Baseline?
|
|
1519
|
+
|
|
1520
|
+
def self.read: (String path) -> Baseline?
|
|
1521
|
+
|
|
1522
|
+
def self.generate: (current_floors current) -> Baseline
|
|
1523
|
+
|
|
1524
|
+
attr_reader entries: Hash[String, Hash[Symbol, Floor]]
|
|
1525
|
+
|
|
1526
|
+
def initialize: (Hash[String, Hash[Symbol, Floor]] entries) -> void
|
|
1527
|
+
|
|
1528
|
+
def entry_for: (String project_filename) -> Hash[Symbol, Floor]?
|
|
1529
|
+
|
|
1530
|
+
def floor_for: (String project_filename, Symbol criterion) -> Floor?
|
|
1531
|
+
|
|
1532
|
+
def covers?: (String project_filename, Symbol criterion) -> bool
|
|
1533
|
+
|
|
1534
|
+
def ratchet: (current_floors current) -> Outcome
|
|
1535
|
+
|
|
1536
|
+
def to_yaml: () -> String
|
|
1537
|
+
|
|
1538
|
+
private
|
|
1539
|
+
|
|
1540
|
+
def ratchet_entry: (Hash[Symbol, Floor] entry, Hash[Symbol, {percent: Numeric, missed: Integer}]? current_entry) -> {bucket: Symbol, ?entry: Hash[Symbol, Floor]}
|
|
1541
|
+
|
|
1542
|
+
def bucket_for: (Hash[Symbol, Floor] entry, Hash[Symbol, Floor] merged, Hash[Symbol, {percent: Numeric, missed: Integer}] current_entry) -> Symbol
|
|
1543
|
+
|
|
1544
|
+
def tighten: (Floor? floor, {percent: Numeric, missed: Integer}? current) -> Floor
|
|
1545
|
+
|
|
1546
|
+
def dump_floor: (Floor floor) -> Hash[String, untyped]
|
|
1547
|
+
end
|
|
1548
|
+
end
|
|
1549
|
+
|
|
1550
|
+
|
|
1551
|
+
module SimpleCov
|
|
1552
|
+
module Configuration
|
|
1553
|
+
DEPRECATION_MODES: Array[Symbol]
|
|
1554
|
+
|
|
1555
|
+
@deprecations: Symbol?
|
|
1556
|
+
|
|
1557
|
+
def deprecations: (?Symbol? mode) -> Symbol
|
|
1558
|
+
end
|
|
1559
|
+
end
|
|
1560
|
+
|
|
1561
|
+
|
|
1562
|
+
module SimpleCov
|
|
1563
|
+
module Configuration
|
|
1564
|
+
@baseline_file: String?
|
|
1565
|
+
|
|
1566
|
+
@baseline: Baseline?
|
|
1567
|
+
|
|
1568
|
+
@baseline_path: String?
|
|
1569
|
+
|
|
1570
|
+
def baseline_file: (?String? path) -> String
|
|
1571
|
+
|
|
1572
|
+
def baseline_file=: (String path) -> String
|
|
1573
|
+
|
|
1574
|
+
def baseline: () -> Baseline?
|
|
1575
|
+
end
|
|
1576
|
+
end
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
module SimpleCov
|
|
1580
|
+
type profile_proc = ^() [self: untyped] -> void
|
|
1581
|
+
|
|
1582
|
+
class Profiles < Hash[Symbol, profile_proc]
|
|
1583
|
+
def define: (Symbol | String name) { () [self: singleton(SimpleCov)] -> void } -> profile_proc
|
|
1584
|
+
|
|
1585
|
+
def load: (Symbol | String name) -> void
|
|
1586
|
+
|
|
1587
|
+
def fetch_proc: (Symbol | String name) -> profile_proc
|
|
1588
|
+
|
|
1589
|
+
private
|
|
1590
|
+
|
|
1591
|
+
def autoload_profile: (Symbol name) -> void
|
|
1592
|
+
end
|
|
1593
|
+
end
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
module SimpleCov
|
|
1597
|
+
module ParallelAdapters
|
|
1598
|
+
interface _Adapter
|
|
1599
|
+
def active?: () -> boolish
|
|
1600
|
+
|
|
1601
|
+
def first_worker?: () -> bool
|
|
1602
|
+
|
|
1603
|
+
def wait_for_siblings: () -> void
|
|
1604
|
+
|
|
1605
|
+
def native_wait?: () -> boolish
|
|
1606
|
+
|
|
1607
|
+
def expected_worker_count: () -> Integer
|
|
1608
|
+
end
|
|
1609
|
+
|
|
1610
|
+
@adapters: Array[_Adapter]?
|
|
1611
|
+
|
|
1612
|
+
self.@adapters: Array[_Adapter]?
|
|
1613
|
+
|
|
1614
|
+
@current: _Adapter?
|
|
1615
|
+
|
|
1616
|
+
self.@current: _Adapter?
|
|
1617
|
+
|
|
1618
|
+
def self?.adapters: () -> Array[_Adapter]
|
|
1619
|
+
|
|
1620
|
+
def self?.register: (_Adapter adapter) -> _Adapter
|
|
1621
|
+
|
|
1622
|
+
def self?.current: () -> _Adapter?
|
|
1623
|
+
|
|
1624
|
+
def self?.reset_current!: () -> void
|
|
1625
|
+
end
|
|
1626
|
+
end
|
|
1627
|
+
|
|
1628
|
+
|
|
1629
|
+
module SimpleCov
|
|
1630
|
+
module ParallelAdapters
|
|
1631
|
+
class Base
|
|
1632
|
+
def self.active?: () -> boolish
|
|
1633
|
+
|
|
1634
|
+
def self.first_worker?: () -> bool
|
|
1635
|
+
|
|
1636
|
+
def self.wait_for_siblings: () -> void
|
|
1637
|
+
|
|
1638
|
+
def self.native_wait?: () -> boolish
|
|
1639
|
+
|
|
1640
|
+
def self.expected_worker_count: () -> Integer
|
|
1641
|
+
|
|
1642
|
+
def self.forced_off?: () -> bool
|
|
1643
|
+
|
|
1644
|
+
def self.parallel_test_groups_count: () -> Integer
|
|
1645
|
+
end
|
|
1646
|
+
end
|
|
1647
|
+
end
|
|
1648
|
+
|
|
1649
|
+
|
|
1650
|
+
module SimpleCov
|
|
1651
|
+
module ParallelAdapters
|
|
1652
|
+
class GenericAdapter < Base
|
|
1653
|
+
def self.active?: () -> bool
|
|
1654
|
+
|
|
1655
|
+
def self.first_worker?: () -> bool
|
|
1656
|
+
|
|
1657
|
+
def self.expected_worker_count: () -> Integer
|
|
1658
|
+
end
|
|
1659
|
+
end
|
|
1660
|
+
end
|
|
1661
|
+
|
|
1662
|
+
|
|
1663
|
+
module SimpleCov
|
|
1664
|
+
module ParallelAdapters
|
|
1665
|
+
class ParallelTestsAdapter < Base
|
|
1666
|
+
def self.active?: () -> bool
|
|
1667
|
+
|
|
1668
|
+
def self.first_worker?: () -> bool
|
|
1669
|
+
|
|
1670
|
+
def self.wait_for_siblings: () -> void
|
|
1671
|
+
|
|
1672
|
+
def self.native_wait?: () -> bool
|
|
1673
|
+
|
|
1674
|
+
def self.expected_worker_count: () -> Integer
|
|
1675
|
+
|
|
1676
|
+
def self.ensure_loaded: () -> void
|
|
1677
|
+
|
|
1678
|
+
def self.env_suggests_parallel_tests?: () -> bool
|
|
1679
|
+
|
|
1680
|
+
def self.native_parallel_tests_environment?: () -> bool
|
|
1681
|
+
end
|
|
1682
|
+
end
|
|
1683
|
+
end
|
|
1684
|
+
|
|
1685
|
+
|
|
1686
|
+
module SimpleCov
|
|
1687
|
+
module Deprecation
|
|
1688
|
+
MODES: Array[Symbol]
|
|
1689
|
+
|
|
1690
|
+
def self?.mode: () -> Symbol
|
|
1691
|
+
|
|
1692
|
+
def self?.mode=: (Symbol mode) -> Symbol
|
|
1693
|
+
|
|
1694
|
+
def self?.warn: (String message, ?location: String?) -> void
|
|
1695
|
+
|
|
1696
|
+
def self?.caller_location: () -> String?
|
|
1697
|
+
|
|
1698
|
+
@emitted: Set[String]?
|
|
1699
|
+
|
|
1700
|
+
self.@emitted: Set[String]?
|
|
1701
|
+
|
|
1702
|
+
@mode: Symbol?
|
|
1703
|
+
|
|
1704
|
+
self.@mode: Symbol?
|
|
1705
|
+
|
|
1706
|
+
def self?.emitted: () -> Set[String]
|
|
1707
|
+
|
|
1708
|
+
def self?.reset!: () -> void
|
|
1709
|
+
end
|
|
1710
|
+
end
|