roast-ai 0.4.6 → 0.4.7

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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yaml +3 -1
  3. data/.gitignore +7 -0
  4. data/.rubocop.yml +14 -0
  5. data/CHANGELOG.md +5 -0
  6. data/Gemfile +2 -1
  7. data/Gemfile.lock +9 -1
  8. data/Rakefile +14 -4
  9. data/examples/available_tools_demo/workflow.yml +2 -2
  10. data/examples/cmd/basic_workflow.yml +0 -1
  11. data/examples/grading/js_test_runner +1 -1
  12. data/examples/grading/run_coverage.rb +1 -1
  13. data/examples/user_input/funny_name/workflow.yml +3 -4
  14. data/lib/roast/dsl/executor.rb +2 -1
  15. data/lib/roast/helpers/cmd_runner.rb +199 -0
  16. data/lib/roast/initializers.rb +1 -1
  17. data/lib/roast/tools/apply_diff.rb +1 -1
  18. data/lib/roast/tools/bash.rb +4 -4
  19. data/lib/roast/tools/cmd.rb +3 -5
  20. data/lib/roast/tools/coding_agent.rb +1 -1
  21. data/lib/roast/tools/grep.rb +6 -2
  22. data/lib/roast/tools/read_file.rb +2 -1
  23. data/lib/roast/tools/swarm.rb +2 -7
  24. data/lib/roast/tools.rb +10 -1
  25. data/lib/roast/version.rb +1 -1
  26. data/lib/roast/workflow/command_executor.rb +3 -3
  27. data/lib/roast/workflow/resource_resolver.rb +1 -1
  28. data/lib/roast/workflow/shell_script_step.rb +1 -1
  29. data/lib/roast.rb +1 -0
  30. data/rubocop/cop/roast/use_cmd_runner.rb +93 -0
  31. data/rubocop/cop/roast.rb +4 -0
  32. data/sorbet/rbi/gems/docile@1.4.1.rbi +377 -0
  33. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +233 -2
  34. data/sorbet/rbi/gems/racc@1.8.1.rbi +6 -4
  35. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +396 -2
  36. data/sorbet/rbi/gems/regexp_parser@2.10.0.rbi +3788 -2
  37. data/sorbet/rbi/gems/rubocop-ast@1.45.1.rbi +7747 -2
  38. data/sorbet/rbi/gems/rubocop-sorbet@0.10.5.rbi +2386 -0
  39. data/sorbet/rbi/gems/rubocop@1.77.0.rbi +62813 -2
  40. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1311 -2
  41. data/sorbet/rbi/gems/simplecov-html@0.13.2.rbi +225 -0
  42. data/sorbet/rbi/gems/simplecov@0.22.0.rbi +2259 -0
  43. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +9 -0
  44. data/sorbet/rbi/gems/unicode-display_width@3.1.4.rbi +125 -2
  45. data/sorbet/rbi/gems/unicode-emoji@4.0.4.rbi +244 -2
  46. data/sorbet/tapioca/require.rb +2 -1
  47. metadata +9 -2
  48. data/lib/roast/helpers/timeout_handler.rb +0 -89
@@ -0,0 +1,2259 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `simplecov` gem.
5
+ # Please instead update this file by running `bin/tapioca gem simplecov`.
6
+
7
+
8
+ # How minitest plugins. See https://github.com/simplecov-ruby/simplecov/pull/756 for why we need this.
9
+ # https://github.com/seattlerb/minitest#writing-extensions
10
+ #
11
+ # source://simplecov//lib/minitest/simplecov_plugin.rb#5
12
+ module Minitest
13
+ class << self
14
+ # source://minitest/5.25.5/lib/minitest.rb#323
15
+ def __run(reporter, options); end
16
+
17
+ # source://minitest/5.25.5/lib/minitest.rb#97
18
+ def after_run(&block); end
19
+
20
+ # source://minitest/5.25.5/lib/minitest.rb#20
21
+ def allow_fork; end
22
+
23
+ # source://minitest/5.25.5/lib/minitest.rb#20
24
+ def allow_fork=(_arg0); end
25
+
26
+ # source://minitest/5.25.5/lib/minitest.rb#70
27
+ def autorun; end
28
+
29
+ # source://minitest/5.25.5/lib/minitest.rb#20
30
+ def backtrace_filter; end
31
+
32
+ # source://minitest/5.25.5/lib/minitest.rb#20
33
+ def backtrace_filter=(_arg0); end
34
+
35
+ # source://minitest/5.25.5/lib/minitest.rb#19
36
+ def cattr_accessor(name); end
37
+
38
+ # source://minitest/5.25.5/lib/minitest.rb#1216
39
+ def clock_time; end
40
+
41
+ # source://minitest/5.25.5/lib/minitest.rb#303
42
+ def empty_run!(options); end
43
+
44
+ # source://minitest/5.25.5/lib/minitest.rb#20
45
+ def extensions; end
46
+
47
+ # source://minitest/5.25.5/lib/minitest.rb#20
48
+ def extensions=(_arg0); end
49
+
50
+ # source://minitest/5.25.5/lib/minitest.rb#336
51
+ def filter_backtrace(bt); end
52
+
53
+ # source://minitest/5.25.5/lib/minitest.rb#20
54
+ def info_signal; end
55
+
56
+ # source://minitest/5.25.5/lib/minitest.rb#20
57
+ def info_signal=(_arg0); end
58
+
59
+ # source://minitest/5.25.5/lib/minitest.rb#125
60
+ def init_plugins(options); end
61
+
62
+ # source://minitest/5.25.5/lib/minitest.rb#109
63
+ def load_plugins; end
64
+
65
+ # source://minitest/5.25.5/lib/minitest.rb#20
66
+ def parallel_executor; end
67
+
68
+ # source://minitest/5.25.5/lib/minitest.rb#20
69
+ def parallel_executor=(_arg0); end
70
+
71
+ # source://guard-minitest/2.4.6/lib/minitest/guard_minitest_plugin.rb#8
72
+ def plugin_guard_minitest_init(options); end
73
+
74
+ # source://guard-minitest/2.4.6/lib/minitest/guard_minitest_plugin.rb#2
75
+ def plugin_guard_minitest_options(opts, options); end
76
+
77
+ # source://minitest/5.25.5/lib/minitest/pride_plugin.rb#10
78
+ def plugin_pride_init(options); end
79
+
80
+ # source://minitest/5.25.5/lib/minitest/pride_plugin.rb#4
81
+ def plugin_pride_options(opts, _options); end
82
+
83
+ # source://minitest-rg/5.3.0/lib/minitest/rg_plugin.rb#12
84
+ def plugin_rg_init(options); end
85
+
86
+ # source://minitest-rg/5.3.0/lib/minitest/rg_plugin.rb#6
87
+ def plugin_rg_options(opts, _options); end
88
+
89
+ # source://simplecov//lib/minitest/simplecov_plugin.rb#6
90
+ def plugin_simplecov_init(_options); end
91
+
92
+ # source://minitest/5.25.5/lib/minitest.rb#143
93
+ def process_args(args = T.unsafe(nil)); end
94
+
95
+ # source://minitest/5.25.5/lib/minitest.rb#104
96
+ def register_plugin(name_or_mod); end
97
+
98
+ # source://minitest/5.25.5/lib/minitest.rb#20
99
+ def reporter; end
100
+
101
+ # source://minitest/5.25.5/lib/minitest.rb#20
102
+ def reporter=(_arg0); end
103
+
104
+ # source://minitest/5.25.5/lib/minitest.rb#269
105
+ def run(args = T.unsafe(nil)); end
106
+
107
+ # source://minitest/5.25.5/lib/minitest.rb#1207
108
+ def run_one_method(klass, method_name); end
109
+
110
+ # source://minitest/5.25.5/lib/minitest.rb#20
111
+ def seed; end
112
+
113
+ # source://minitest/5.25.5/lib/minitest.rb#20
114
+ def seed=(_arg0); end
115
+ end
116
+ end
117
+
118
+ # Code coverage for ruby. Please check out README for a full introduction.
119
+ #
120
+ # source://simplecov//lib/simplecov.rb#22
121
+ module SimpleCov
122
+ extend ::SimpleCov::Configuration
123
+
124
+ class << self
125
+ # source://simplecov//lib/simplecov.rb#174
126
+ def at_exit_behavior; end
127
+
128
+ # Clear out the previously cached .result. Primarily useful in testing
129
+ #
130
+ # source://simplecov//lib/simplecov.rb#170
131
+ def clear_result; end
132
+
133
+ # Collate a series of SimpleCov result files into a single SimpleCov output.
134
+ #
135
+ # You can optionally specify configuration with a block:
136
+ # SimpleCov.collate Dir["simplecov-resultset-*/.resultset.json"]
137
+ # OR
138
+ # SimpleCov.collate Dir["simplecov-resultset-*/.resultset.json"], 'rails' # using rails profile
139
+ # OR
140
+ # SimpleCov.collate Dir["simplecov-resultset-*/.resultset.json"] do
141
+ # add_filter 'test'
142
+ # end
143
+ # OR
144
+ # SimpleCov.collate Dir["simplecov-resultset-*/.resultset.json"], 'rails' do
145
+ # add_filter 'test'
146
+ # end
147
+ #
148
+ # Please check out the RDoc for SimpleCov::Configuration to find about
149
+ # available config options, or checkout the README for more in-depth
150
+ # information about coverage collation
151
+ #
152
+ # By default `collate` ignores the merge_timeout so all results of all files specified will be
153
+ # merged together. If you want to honor the merge_timeout then provide the keyword argument
154
+ # `ignore_timeout: false`.
155
+ #
156
+ # source://simplecov//lib/simplecov.rb#86
157
+ def collate(result_filenames, profile = T.unsafe(nil), ignore_timeout: T.unsafe(nil), &block); end
158
+
159
+ # Thinking: Move this behavior earlier so if there was an error we do nothing?
160
+ #
161
+ # @api private
162
+ #
163
+ # source://simplecov//lib/simplecov.rb#223
164
+ def exit_and_report_previous_error(exit_status); end
165
+
166
+ # Returns the exit status from the exit exception
167
+ #
168
+ # @api private
169
+ #
170
+ # source://simplecov//lib/simplecov.rb#200
171
+ def exit_status_from_exception; end
172
+
173
+ # Basically, should we take care of at_exit behavior or something else?
174
+ # Used by the minitest plugin. See lib/minitest/simplecov_plugin.rb
175
+ #
176
+ # source://simplecov//lib/simplecov.rb#28
177
+ def external_at_exit; end
178
+
179
+ # Basically, should we take care of at_exit behavior or something else?
180
+ # Used by the minitest plugin. See lib/minitest/simplecov_plugin.rb
181
+ #
182
+ # source://simplecov//lib/simplecov.rb#28
183
+ def external_at_exit=(_arg0); end
184
+
185
+ # Basically, should we take care of at_exit behavior or something else?
186
+ # Used by the minitest plugin. See lib/minitest/simplecov_plugin.rb
187
+ #
188
+ # source://simplecov//lib/simplecov.rb#28
189
+ def external_at_exit?; end
190
+
191
+ # Applies the configured filters to the given array of SimpleCov::SourceFile items
192
+ #
193
+ # source://simplecov//lib/simplecov.rb#131
194
+ def filtered(files); end
195
+
196
+ # @api private
197
+ # @return [Boolean]
198
+ #
199
+ # source://simplecov//lib/simplecov.rb#268
200
+ def final_result_process?; end
201
+
202
+ # Applies the configured groups to the given array of SimpleCov::SourceFile items
203
+ #
204
+ # source://simplecov//lib/simplecov.rb#142
205
+ def grouped(files); end
206
+
207
+ # source://simplecov//lib/simplecov.rb#162
208
+ def load_adapter(name); end
209
+
210
+ # Applies the profile of given name on SimpleCov configuration
211
+ #
212
+ # source://simplecov//lib/simplecov.rb#158
213
+ def load_profile(name); end
214
+
215
+ # Returns the value of attribute pid.
216
+ #
217
+ # source://simplecov//lib/simplecov.rb#24
218
+ def pid; end
219
+
220
+ # Sets the attribute pid
221
+ #
222
+ # @param value the value to set the attribute pid to.
223
+ #
224
+ # source://simplecov//lib/simplecov.rb#24
225
+ def pid=(_arg0); end
226
+
227
+ # @api private
228
+ # @return [Boolean]
229
+ #
230
+ # source://simplecov//lib/simplecov.rb#213
231
+ def previous_error?(error_exit_status); end
232
+
233
+ # Usage:
234
+ # exit_status = SimpleCov.process_result(SimpleCov.result, exit_status)
235
+ #
236
+ # @api private
237
+ #
238
+ # source://simplecov//lib/simplecov.rb#248
239
+ def process_result(result); end
240
+
241
+ # source://simplecov//lib/simplecov.rb#233
242
+ def process_results_and_report_error; end
243
+
244
+ # @api private
245
+ # @return [Boolean]
246
+ #
247
+ # source://simplecov//lib/simplecov.rb#229
248
+ def ready_to_process_results?; end
249
+
250
+ # Returns the result for the current coverage run, merging it across test suites
251
+ # from cache using SimpleCov::ResultMerger if use_merging is activated (default)
252
+ #
253
+ # source://simplecov//lib/simplecov.rb#101
254
+ def result; end
255
+
256
+ # Returns nil if the result has not been computed
257
+ # Otherwise, returns the result
258
+ #
259
+ # @return [Boolean]
260
+ #
261
+ # source://simplecov//lib/simplecov.rb#124
262
+ def result?; end
263
+
264
+ # source://simplecov//lib/simplecov.rb#256
265
+ def result_exit_status(result); end
266
+
267
+ # Rounding down to be extra strict, see #679
268
+ #
269
+ # @api private
270
+ #
271
+ # source://simplecov//lib/simplecov.rb#296
272
+ def round_coverage(coverage); end
273
+
274
+ # Called from at_exit block
275
+ #
276
+ # @api private
277
+ #
278
+ # source://simplecov//lib/simplecov.rb#186
279
+ def run_exit_tasks!; end
280
+
281
+ # Returns the value of attribute running.
282
+ #
283
+ # source://simplecov//lib/simplecov.rb#24
284
+ def running; end
285
+
286
+ # Sets the attribute running
287
+ #
288
+ # @param value the value to set the attribute running to.
289
+ #
290
+ # source://simplecov//lib/simplecov.rb#24
291
+ def running=(_arg0); end
292
+
293
+ # Sets up SimpleCov to run against your project.
294
+ # You can optionally specify a profile to use as well as configuration with a block:
295
+ # SimpleCov.start
296
+ # OR
297
+ # SimpleCov.start 'rails' # using rails profile
298
+ # OR
299
+ # SimpleCov.start do
300
+ # add_filter 'test'
301
+ # end
302
+ # OR
303
+ # SimpleCov.start 'rails' do
304
+ # add_filter 'test'
305
+ # end
306
+ #
307
+ # Please check out the RDoc for SimpleCov::Configuration to find about available config options
308
+ #
309
+ # source://simplecov//lib/simplecov.rb#48
310
+ def start(profile = T.unsafe(nil), &block); end
311
+
312
+ # @api private
313
+ #
314
+ # source://simplecov//lib/simplecov.rb#276
315
+ def wait_for_other_processes; end
316
+
317
+ # @api private
318
+ #
319
+ # source://simplecov//lib/simplecov.rb#285
320
+ def write_last_run(result); end
321
+
322
+ private
323
+
324
+ # Unite the result so it wouldn't matter what coverage type was called
325
+ #
326
+ # @return [Hash]
327
+ #
328
+ # source://simplecov//lib/simplecov.rb#399
329
+ def adapt_coverage_result; end
330
+
331
+ # Finds files that were to be tracked but were not loaded and initializes
332
+ # the line-by-line coverage to zero (if relevant) or nil (comments / whitespace etc).
333
+ #
334
+ # source://simplecov//lib/simplecov.rb#371
335
+ def add_not_loaded_files(result); end
336
+
337
+ # source://simplecov//lib/simplecov.rb#302
338
+ def initial_setup(profile, &block); end
339
+
340
+ # source://simplecov//lib/simplecov.rb#363
341
+ def lookup_corresponding_ruby_coverage_name(criterion); end
342
+
343
+ # parallel_tests isn't always available, see: https://github.com/grosser/parallel_tests/issues/772
344
+ #
345
+ # source://simplecov//lib/simplecov.rb#425
346
+ def make_parallel_tests_available; end
347
+
348
+ # @return [Boolean]
349
+ #
350
+ # source://simplecov//lib/simplecov.rb#434
351
+ def probably_running_parallel_tests?; end
352
+
353
+ # Call steps that handle process coverage result
354
+ #
355
+ # @return [Hash]
356
+ #
357
+ # source://simplecov//lib/simplecov.rb#388
358
+ def process_coverage_result; end
359
+
360
+ # Filter coverage result
361
+ # The result before filter also has result of coverage for files
362
+ # are not related to the project like loaded gems coverage.
363
+ #
364
+ # @return [Hash]
365
+ #
366
+ # source://simplecov//lib/simplecov.rb#410
367
+ def remove_useless_results; end
368
+
369
+ # Initialize result with files that are not included by coverage
370
+ # and added inside the config block
371
+ #
372
+ # @return [Hash]
373
+ #
374
+ # source://simplecov//lib/simplecov.rb#420
375
+ def result_with_not_loaded_files; end
376
+
377
+ # Trigger Coverage.start depends on given config coverage_criterion
378
+ #
379
+ # With Positive branch it supports all coverage measurement types
380
+ # With Negative branch it supports only line coverage measurement type
381
+ #
382
+ # source://simplecov//lib/simplecov.rb#314
383
+ def start_coverage_measurement; end
384
+
385
+ # source://simplecov//lib/simplecov.rb#349
386
+ def start_coverage_with_criteria; end
387
+ end
388
+ end
389
+
390
+ # source://simplecov//lib/simplecov/filter.rb#77
391
+ class SimpleCov::ArrayFilter < ::SimpleCov::Filter
392
+ # @return [ArrayFilter] a new instance of ArrayFilter
393
+ #
394
+ # source://simplecov//lib/simplecov/filter.rb#78
395
+ def initialize(filter_argument); end
396
+
397
+ # Returns true if any of the filters in the array match the given source file.
398
+ # Configure this Filter like StringFilter.new(['some/path', /^some_regex/, Proc.new {|src_file| ... }])
399
+ #
400
+ # @return [Boolean]
401
+ #
402
+ # source://simplecov//lib/simplecov/filter.rb#88
403
+ def matches?(source_files_list); end
404
+ end
405
+
406
+ # source://simplecov//lib/simplecov/filter.rb#69
407
+ class SimpleCov::BlockFilter < ::SimpleCov::Filter
408
+ # Returns true if the block given when initializing this filter with BlockFilter.new {|src_file| ... }
409
+ # returns true for the given source file.
410
+ #
411
+ # @return [Boolean]
412
+ #
413
+ # source://simplecov//lib/simplecov/filter.rb#72
414
+ def matches?(source_file); end
415
+ end
416
+
417
+ # Functionally for combining coverage results
418
+ #
419
+ # source://simplecov//lib/simplecov/combine.rb#6
420
+ module SimpleCov::Combine
421
+ private
422
+
423
+ # Combine two coverage based on the given combiner_module.
424
+ #
425
+ # Combiners should always be called through this interface,
426
+ # as it takes care of short-circuiting of one of the coverages is nil.
427
+ #
428
+ # @return [Hash]
429
+ #
430
+ # source://simplecov//lib/simplecov/combine.rb#16
431
+ def combine(combiner_module, coverage_a, coverage_b); end
432
+
433
+ # source://simplecov//lib/simplecov/combine.rb#22
434
+ def empty_coverage?(coverage_a, coverage_b); end
435
+
436
+ # source://simplecov//lib/simplecov/combine.rb#26
437
+ def existing_coverage(coverage_a, coverage_b); end
438
+
439
+ class << self
440
+ # Combine two coverage based on the given combiner_module.
441
+ #
442
+ # Combiners should always be called through this interface,
443
+ # as it takes care of short-circuiting of one of the coverages is nil.
444
+ #
445
+ # @return [Hash]
446
+ #
447
+ # source://simplecov//lib/simplecov/combine.rb#16
448
+ def combine(combiner_module, coverage_a, coverage_b); end
449
+
450
+ # @return [Boolean]
451
+ #
452
+ # source://simplecov//lib/simplecov/combine.rb#22
453
+ def empty_coverage?(coverage_a, coverage_b); end
454
+
455
+ # source://simplecov//lib/simplecov/combine.rb#26
456
+ def existing_coverage(coverage_a, coverage_b); end
457
+ end
458
+ end
459
+
460
+ # Combine different branch coverage results on single file.
461
+ #
462
+ # Should be called through `SimpleCov.combine`.
463
+ #
464
+ # source://simplecov//lib/simplecov/combine/branches_combiner.rb#9
465
+ module SimpleCov::Combine::BranchesCombiner
466
+ private
467
+
468
+ # Return merged branches or the existed brach if other is missing.
469
+ #
470
+ # Branches inside files are always same if they exist, the difference only in coverage count.
471
+ # Branch coverage report for any conditional case is built from hash, it's key is a condition and
472
+ # it's body is a hash << keys from condition and value is coverage rate >>.
473
+ # ex: branches =>{ [:if, 3, 8, 6, 8, 36] => {[:then, 4, 8, 6, 8, 12] => 1, [:else, 5, 8, 6, 8, 36]=>2}, other conditions...}
474
+ # We create copy of result and update it values depending on the combined branches coverage values.
475
+ #
476
+ # @return [Hash]
477
+ #
478
+ # source://simplecov//lib/simplecov/combine/branches_combiner.rb#23
479
+ def combine(coverage_a, coverage_b); end
480
+
481
+ class << self
482
+ # Return merged branches or the existed brach if other is missing.
483
+ #
484
+ # Branches inside files are always same if they exist, the difference only in coverage count.
485
+ # Branch coverage report for any conditional case is built from hash, it's key is a condition and
486
+ # it's body is a hash << keys from condition and value is coverage rate >>.
487
+ # ex: branches =>{ [:if, 3, 8, 6, 8, 36] => {[:then, 4, 8, 6, 8, 12] => 1, [:else, 5, 8, 6, 8, 36]=>2}, other conditions...}
488
+ # We create copy of result and update it values depending on the combined branches coverage values.
489
+ #
490
+ # @return [Hash]
491
+ #
492
+ # source://simplecov//lib/simplecov/combine/branches_combiner.rb#23
493
+ def combine(coverage_a, coverage_b); end
494
+ end
495
+ end
496
+
497
+ # Handle combining two coverage results for same file
498
+ #
499
+ # Should be called through `SimpleCov.combine`.
500
+ #
501
+ # source://simplecov//lib/simplecov/combine/files_combiner.rb#9
502
+ module SimpleCov::Combine::FilesCombiner
503
+ private
504
+
505
+ # Combines the results for 2 coverages of a file.
506
+ #
507
+ # @return [Hash]
508
+ #
509
+ # source://simplecov//lib/simplecov/combine/files_combiner.rb#17
510
+ def combine(coverage_a, coverage_b); end
511
+
512
+ class << self
513
+ # Combines the results for 2 coverages of a file.
514
+ #
515
+ # @return [Hash]
516
+ #
517
+ # source://simplecov//lib/simplecov/combine/files_combiner.rb#17
518
+ def combine(coverage_a, coverage_b); end
519
+ end
520
+ end
521
+
522
+ # Combine two different lines coverage results on same file
523
+ #
524
+ # Should be called through `SimpleCov.combine`.
525
+ #
526
+ # source://simplecov//lib/simplecov/combine/lines_combiner.rb#9
527
+ module SimpleCov::Combine::LinesCombiner
528
+ private
529
+
530
+ # source://simplecov//lib/simplecov/combine/lines_combiner.rb#12
531
+ def combine(coverage_a, coverage_b); end
532
+
533
+ # Return depends on coverage in a specific line
534
+ #
535
+ # Logic:
536
+ #
537
+ # => nil + 0 = nil
538
+ # => nil + nil = nil
539
+ # => int + int = int
540
+ #
541
+ # @param first_val [Integer || nil]
542
+ # @param second_val [Integer || nil]
543
+ # @return [Integer || nil]
544
+ #
545
+ # source://simplecov//lib/simplecov/combine/lines_combiner.rb#32
546
+ def merge_line_coverage(first_val, second_val); end
547
+
548
+ class << self
549
+ # source://simplecov//lib/simplecov/combine/lines_combiner.rb#12
550
+ def combine(coverage_a, coverage_b); end
551
+
552
+ # Return depends on coverage in a specific line
553
+ #
554
+ # Logic:
555
+ #
556
+ # => nil + 0 = nil
557
+ # => nil + nil = nil
558
+ # => int + int = int
559
+ #
560
+ # @param first_val [Integer || nil]
561
+ # @param second_val [Integer || nil]
562
+ # @return [Integer || nil]
563
+ #
564
+ # source://simplecov//lib/simplecov/combine/lines_combiner.rb#32
565
+ def merge_line_coverage(first_val, second_val); end
566
+ end
567
+ end
568
+
569
+ # There might be reports from different kinds of tests,
570
+ # e.g. RSpec and Cucumber. We need to combine their results
571
+ # into unified one. This class does that.
572
+ # To unite the results on file basis, it leverages
573
+ # the combine of lines and branches inside each file within given results.
574
+ #
575
+ # source://simplecov//lib/simplecov/combine/results_combiner.rb#10
576
+ module SimpleCov::Combine::ResultsCombiner
577
+ private
578
+
579
+ # Combine process explanation
580
+ # => ResultCombiner: define all present files between results and start combine on file level.
581
+ # ==> FileCombiner: collect result of next combine levels lines and branches.
582
+ # ===> LinesCombiner: combine lines results.
583
+ # ===> BranchesCombiner: combine branches results.
584
+ #
585
+ # @return [Hash]
586
+ #
587
+ # source://simplecov//lib/simplecov/combine/results_combiner.rb#22
588
+ def combine(*results); end
589
+
590
+ # Combine two files coverage results
591
+ #
592
+ # @param coverage_a [Hash]
593
+ # @param coverage_b [Hash]
594
+ # @return [Hash]
595
+ #
596
+ # source://simplecov//lib/simplecov/combine/results_combiner.rb#55
597
+ def combine_file_coverage(coverage_a, coverage_b); end
598
+
599
+ # Manage combining results on files level
600
+ #
601
+ # @param combined_results [Hash]
602
+ # @param result [Hash]
603
+ # @return [Hash]
604
+ #
605
+ # source://simplecov//lib/simplecov/combine/results_combiner.rb#36
606
+ def combine_result_sets(combined_results, result); end
607
+
608
+ class << self
609
+ # Combine process explanation
610
+ # => ResultCombiner: define all present files between results and start combine on file level.
611
+ # ==> FileCombiner: collect result of next combine levels lines and branches.
612
+ # ===> LinesCombiner: combine lines results.
613
+ # ===> BranchesCombiner: combine branches results.
614
+ #
615
+ # @return [Hash]
616
+ #
617
+ # source://simplecov//lib/simplecov/combine/results_combiner.rb#22
618
+ def combine(*results); end
619
+
620
+ # Combine two files coverage results
621
+ #
622
+ # @param coverage_a [Hash]
623
+ # @param coverage_b [Hash]
624
+ # @return [Hash]
625
+ #
626
+ # source://simplecov//lib/simplecov/combine/results_combiner.rb#55
627
+ def combine_file_coverage(coverage_a, coverage_b); end
628
+
629
+ # Manage combining results on files level
630
+ #
631
+ # @param combined_results [Hash]
632
+ # @param result [Hash]
633
+ # @return [Hash]
634
+ #
635
+ # source://simplecov//lib/simplecov/combine/results_combiner.rb#36
636
+ def combine_result_sets(combined_results, result); end
637
+ end
638
+ end
639
+
640
+ # Helper that tries to find out what test suite is running (for SimpleCov.command_name)
641
+ #
642
+ # source://simplecov//lib/simplecov/command_guesser.rb#7
643
+ module SimpleCov::CommandGuesser
644
+ class << self
645
+ # source://simplecov//lib/simplecov/command_guesser.rb#16
646
+ def guess; end
647
+
648
+ # Storage for the original command line call that invoked the test suite.
649
+ # This has got to be stored as early as possible because i.e. rake and test/unit 2
650
+ # have a habit of tampering with ARGV, which makes i.e. the automatic distinction
651
+ # between rails unit/functional/integration tests impossible without this cached
652
+ # item.
653
+ #
654
+ # source://simplecov//lib/simplecov/command_guesser.rb#14
655
+ def original_run_command; end
656
+
657
+ # Storage for the original command line call that invoked the test suite.
658
+ # This has got to be stored as early as possible because i.e. rake and test/unit 2
659
+ # have a habit of tampering with ARGV, which makes i.e. the automatic distinction
660
+ # between rails unit/functional/integration tests impossible without this cached
661
+ # item.
662
+ #
663
+ # source://simplecov//lib/simplecov/command_guesser.rb#14
664
+ def original_run_command=(_arg0); end
665
+
666
+ private
667
+
668
+ # source://simplecov//lib/simplecov/command_guesser.rb#31
669
+ def from_command_line_options; end
670
+
671
+ # source://simplecov//lib/simplecov/command_guesser.rb#46
672
+ def from_defined_constants; end
673
+
674
+ # source://simplecov//lib/simplecov/command_guesser.rb#22
675
+ def from_env; end
676
+ end
677
+ end
678
+
679
+ # Bundles the configuration options used for SimpleCov. All methods
680
+ # defined here are usable from SimpleCov directly. Please check out
681
+ # SimpleCov documentation for further info.
682
+ #
683
+ # source://simplecov//lib/simplecov/configuration.rb#13
684
+ module SimpleCov::Configuration
685
+ # source://simplecov//lib/simplecov/configuration.rb#161
686
+ def adapters; end
687
+
688
+ # Add a filter to the processing chain.
689
+ # There are four ways to define a filter:
690
+ #
691
+ # * as a String that will then be matched against all source files' file paths,
692
+ # SimpleCov.add_filter 'app/models' # will reject all your models
693
+ # * as a block which will be passed the source file in question and should either
694
+ # return a true or false value, depending on whether the file should be removed
695
+ # SimpleCov.add_filter do |src_file|
696
+ # File.basename(src_file.filename) == 'environment.rb'
697
+ # end # Will exclude environment.rb files from the results
698
+ # * as an array of strings that are matched against all sorce files' file
699
+ # paths and then ignored (basically string filter multiple times)
700
+ # SimpleCov.add_filter ['app/models', 'app/helpers'] # ignores both dirs
701
+ # * as an instance of a subclass of SimpleCov::Filter. See the documentation there
702
+ # on how to define your own filter classes
703
+ #
704
+ # source://simplecov//lib/simplecov/configuration.rb#367
705
+ def add_filter(filter_argument = T.unsafe(nil), &filter_proc); end
706
+
707
+ # Define a group for files. Works similar to add_filter, only that the first
708
+ # argument is the desired group name and files PASSING the filter end up in the group
709
+ # (while filters exclude when the filter is applicable).
710
+ #
711
+ # source://simplecov//lib/simplecov/configuration.rb#376
712
+ def add_group(group_name, filter_argument = T.unsafe(nil), &filter_proc); end
713
+
714
+ # Gets or sets the behavior to process coverage results.
715
+ #
716
+ # By default, it will call SimpleCov.result.format!
717
+ #
718
+ # Configure with:
719
+ #
720
+ # SimpleCov.at_exit do
721
+ # puts "Coverage done"
722
+ # SimpleCov.result.format!
723
+ # end
724
+ #
725
+ # source://simplecov//lib/simplecov/configuration.rb#193
726
+ def at_exit(&block); end
727
+
728
+ # Gets or sets the behavior to start a new forked Process.
729
+ #
730
+ # By default, it will add " (Process #{pid})" to the command_name, and start SimpleCov in quiet mode
731
+ #
732
+ # Configure with:
733
+ #
734
+ # SimpleCov.at_fork do |pid|
735
+ # SimpleCov.start do
736
+ # # This needs a unique name so it won't be ovewritten
737
+ # SimpleCov.command_name "#{SimpleCov.command_name} (subprocess: #{pid})"
738
+ # # be quiet, the parent process will be in charge of using the regular formatter and checking coverage totals
739
+ # SimpleCov.print_error_status = false
740
+ # SimpleCov.formatter SimpleCov::Formatter::SimpleFormatter
741
+ # SimpleCov.minimum_coverage 0
742
+ # # start
743
+ # SimpleCov.start
744
+ # end
745
+ # end
746
+ #
747
+ # source://simplecov//lib/simplecov/configuration.rb#233
748
+ def at_fork(&block); end
749
+
750
+ # @return [Boolean]
751
+ #
752
+ # source://simplecov//lib/simplecov/configuration.rb#428
753
+ def branch_coverage?; end
754
+
755
+ # @return [Boolean]
756
+ #
757
+ # source://simplecov//lib/simplecov/configuration.rb#443
758
+ def branch_coverage_supported?; end
759
+
760
+ # source://simplecov//lib/simplecov/configuration.rb#424
761
+ def clear_coverage_criteria; end
762
+
763
+ # The name of the command (a.k.a. Test Suite) currently running. Used for result
764
+ # merging and caching. It first tries to make a guess based upon the command line
765
+ # arguments the current test suite is running on and should automatically detect
766
+ # unit tests, functional tests, integration tests, rpsec and cucumber and label
767
+ # them properly. If it fails to recognize the current command, the command name
768
+ # is set to the shell command that the current suite is running on.
769
+ #
770
+ # You can specify it manually with SimpleCov.command_name("test:units") - please
771
+ # also check out the corresponding section in README.rdoc
772
+ #
773
+ # source://simplecov//lib/simplecov/configuration.rb#87
774
+ def command_name(name = T.unsafe(nil)); end
775
+
776
+ # Allows you to configure simplecov in a block instead of prepending SimpleCov to all config methods
777
+ # you're calling.
778
+ #
779
+ # SimpleCov.configure do
780
+ # add_filter 'foobar'
781
+ # end
782
+ #
783
+ # This is equivalent to SimpleCov.add_filter 'foobar' and thus makes it easier to set a bunch of configure
784
+ # options at once.
785
+ #
786
+ # source://simplecov//lib/simplecov/configuration.rb#177
787
+ def configure(&block); end
788
+
789
+ # source://simplecov//lib/simplecov/configuration.rb#416
790
+ def coverage_criteria; end
791
+
792
+ # Define which coverage criterion should be evaluated.
793
+ #
794
+ # Possible coverage criteria:
795
+ # * :line - coverage based on lines aka has this line been executed?
796
+ # * :branch - coverage based on branches aka has this branch (think conditions) been executed?
797
+ #
798
+ # If not set the default is `:line`
799
+ #
800
+ # @param criterion [Symbol]
801
+ #
802
+ # source://simplecov//lib/simplecov/configuration.rb#393
803
+ def coverage_criterion(criterion = T.unsafe(nil)); end
804
+
805
+ # @return [Boolean]
806
+ #
807
+ # source://simplecov//lib/simplecov/configuration.rb#420
808
+ def coverage_criterion_enabled?(criterion); end
809
+
810
+ # The name of the output and cache directory. Defaults to 'coverage'
811
+ #
812
+ # Configure with SimpleCov.coverage_dir('cov')
813
+ #
814
+ # source://simplecov//lib/simplecov/configuration.rb#34
815
+ def coverage_dir(dir = T.unsafe(nil)); end
816
+
817
+ # @return [Boolean]
818
+ #
819
+ # source://simplecov//lib/simplecov/configuration.rb#452
820
+ def coverage_for_eval_enabled?; end
821
+
822
+ # @return [Boolean]
823
+ #
824
+ # source://simplecov//lib/simplecov/configuration.rb#447
825
+ def coverage_for_eval_supported?; end
826
+
827
+ # Returns the full path to the output directory using SimpleCov.root
828
+ # and SimpleCov.coverage_dir, so you can adjust this by configuring those
829
+ # values. Will create the directory if it's missing
830
+ #
831
+ # source://simplecov//lib/simplecov/configuration.rb#46
832
+ def coverage_path; end
833
+
834
+ # @return [Boolean]
835
+ #
836
+ # source://simplecov//lib/simplecov/configuration.rb#432
837
+ def coverage_start_arguments_supported?; end
838
+
839
+ # source://simplecov//lib/simplecov/configuration.rb#401
840
+ def enable_coverage(criterion); end
841
+
842
+ # source://simplecov//lib/simplecov/configuration.rb#456
843
+ def enable_coverage_for_eval; end
844
+
845
+ # gets or sets the enabled_for_subprocess configuration
846
+ # when true, this will inject SimpleCov code into Process.fork
847
+ #
848
+ # source://simplecov//lib/simplecov/configuration.rb#202
849
+ def enable_for_subprocesses(value = T.unsafe(nil)); end
850
+
851
+ # gets the enabled_for_subprocess configuration
852
+ #
853
+ # @return [Boolean]
854
+ #
855
+ # source://simplecov//lib/simplecov/configuration.rb#209
856
+ def enabled_for_subprocesses?; end
857
+
858
+ # Returns the list of configured filters. Add filters using SimpleCov.add_filter.
859
+ #
860
+ # source://simplecov//lib/simplecov/configuration.rb#74
861
+ def filters; end
862
+
863
+ # Sets the attribute filters
864
+ #
865
+ # @param value the value to set the attribute filters to.
866
+ #
867
+ # source://simplecov//lib/simplecov/configuration.rb#14
868
+ def filters=(_arg0); end
869
+
870
+ # Gets or sets the configured formatter.
871
+ #
872
+ # Configure with: SimpleCov.formatter(SimpleCov::Formatter::SimpleFormatter)
873
+ #
874
+ # source://simplecov//lib/simplecov/configuration.rb#98
875
+ def formatter(formatter = T.unsafe(nil)); end
876
+
877
+ # Sets the attribute formatter
878
+ #
879
+ # @param value the value to set the attribute formatter to.
880
+ #
881
+ # source://simplecov//lib/simplecov/configuration.rb#14
882
+ def formatter=(_arg0); end
883
+
884
+ # Gets the configured formatters.
885
+ #
886
+ # source://simplecov//lib/simplecov/configuration.rb#117
887
+ def formatters; end
888
+
889
+ # Sets the configured formatters.
890
+ #
891
+ # source://simplecov//lib/simplecov/configuration.rb#110
892
+ def formatters=(formatters); end
893
+
894
+ # Returns the configured groups. Add groups using SimpleCov.add_group
895
+ #
896
+ # source://simplecov//lib/simplecov/configuration.rb#150
897
+ def groups; end
898
+
899
+ # Sets the attribute groups
900
+ #
901
+ # @param value the value to set the attribute groups to.
902
+ #
903
+ # source://simplecov//lib/simplecov/configuration.rb#14
904
+ def groups=(_arg0); end
905
+
906
+ # Defines the maximum coverage drop at once allowed for the testsuite to pass.
907
+ # SimpleCov will return non-zero if the coverage decreases by more than this threshold.
908
+ #
909
+ # Default is 100% (disabled)
910
+ #
911
+ # source://simplecov//lib/simplecov/configuration.rb#313
912
+ def maximum_coverage_drop(coverage_drop = T.unsafe(nil)); end
913
+
914
+ # Defines the maximum age (in seconds) of a resultset to still be included in merged results.
915
+ # i.e. If you run cucumber features, then later rake test, if the stored cucumber resultset is
916
+ # more seconds ago than specified here, it won't be taken into account when merging (and is also
917
+ # purged from the resultset cache)
918
+ #
919
+ # Of course, this only applies when merging is active (e.g. SimpleCov.use_merging is not false!)
920
+ #
921
+ # Default is 600 seconds (10 minutes)
922
+ #
923
+ # Configure with SimpleCov.merge_timeout(3600) # 1hr
924
+ #
925
+ # source://simplecov//lib/simplecov/configuration.rb#279
926
+ def merge_timeout(seconds = T.unsafe(nil)); end
927
+
928
+ # Defines the minimum overall coverage required for the testsuite to pass.
929
+ # SimpleCov will return non-zero if the current coverage is below this threshold.
930
+ #
931
+ # Default is 0% (disabled)
932
+ #
933
+ # source://simplecov//lib/simplecov/configuration.rb#290
934
+ def minimum_coverage(coverage = T.unsafe(nil)); end
935
+
936
+ # Defines the minimum coverage per file required for the testsuite to pass.
937
+ # SimpleCov will return non-zero if the current coverage of the least covered file
938
+ # is below this threshold.
939
+ #
940
+ # Default is 0% (disabled)
941
+ #
942
+ # source://simplecov//lib/simplecov/configuration.rb#330
943
+ def minimum_coverage_by_file(coverage = T.unsafe(nil)); end
944
+
945
+ # Certain code blocks (i.e. Ruby-implementation specific code) can be excluded from
946
+ # the coverage metrics by wrapping it inside # :nocov: comment blocks. The nocov token
947
+ # can be configured to be any other string using this.
948
+ #
949
+ # Configure with SimpleCov.nocov_token('skip') or it's alias SimpleCov.skip_token('skip')
950
+ #
951
+ # source://simplecov//lib/simplecov/configuration.rb#140
952
+ def nocov_token(nocov_token = T.unsafe(nil)); end
953
+
954
+ # source://simplecov//lib/simplecov/configuration.rb#407
955
+ def primary_coverage(criterion = T.unsafe(nil)); end
956
+
957
+ # Whether we should print non-success status codes. This can be
958
+ # configured with the #print_error_status= method.
959
+ #
960
+ # source://simplecov//lib/simplecov/configuration.rb#129
961
+ def print_error_status; end
962
+
963
+ # Sets the attribute print_error_status
964
+ #
965
+ # @param value the value to set the attribute print_error_status to.
966
+ #
967
+ # source://simplecov//lib/simplecov/configuration.rb#14
968
+ def print_error_status=(_arg0); end
969
+
970
+ # Returns the hash of available profiles
971
+ #
972
+ # source://simplecov//lib/simplecov/configuration.rb#157
973
+ def profiles; end
974
+
975
+ # Returns the project name - currently assuming the last dirname in
976
+ # the SimpleCov.root is this.
977
+ #
978
+ # source://simplecov//lib/simplecov/configuration.rb#251
979
+ def project_name(new_name = T.unsafe(nil)); end
980
+
981
+ # source://simplecov//lib/simplecov/configuration.rb#300
982
+ def raise_on_invalid_coverage(coverage, coverage_setting); end
983
+
984
+ # Refuses any coverage drop. That is, coverage is only allowed to increase.
985
+ # SimpleCov will return non-zero if the coverage decreases.
986
+ #
987
+ # source://simplecov//lib/simplecov/configuration.rb#344
988
+ def refuse_coverage_drop(*criteria); end
989
+
990
+ # The root for the project. This defaults to the
991
+ # current working directory.
992
+ #
993
+ # Configure with SimpleCov.root('/my/project/path')
994
+ #
995
+ # source://simplecov//lib/simplecov/configuration.rb#22
996
+ def root(root = T.unsafe(nil)); end
997
+
998
+ # Certain code blocks (i.e. Ruby-implementation specific code) can be excluded from
999
+ # the coverage metrics by wrapping it inside # :nocov: comment blocks. The nocov token
1000
+ # can be configured to be any other string using this.
1001
+ #
1002
+ # Configure with SimpleCov.nocov_token('skip') or it's alias SimpleCov.skip_token('skip')
1003
+ #
1004
+ # source://simplecov//lib/simplecov/configuration.rb#140
1005
+ def skip_token(nocov_token = T.unsafe(nil)); end
1006
+
1007
+ # Coverage results will always include files matched by this glob, whether
1008
+ # or not they were explicitly required. Without this, un-required files
1009
+ # will not be present in the final report.
1010
+ #
1011
+ # source://simplecov//lib/simplecov/configuration.rb#59
1012
+ def track_files(glob); end
1013
+
1014
+ # Returns the glob that will be used to include files that were not
1015
+ # explicitly required.
1016
+ #
1017
+ # source://simplecov//lib/simplecov/configuration.rb#67
1018
+ def tracked_files; end
1019
+
1020
+ # Defines whether to use result merging so all your test suites (test:units, test:functionals, cucumber, ...)
1021
+ # are joined and combined into a single coverage report
1022
+ #
1023
+ # source://simplecov//lib/simplecov/configuration.rb#262
1024
+ def use_merging(use = T.unsafe(nil)); end
1025
+
1026
+ private
1027
+
1028
+ # source://simplecov//lib/simplecov/configuration.rb#483
1029
+ def minimum_possible_coverage_exceeded(coverage_option); end
1030
+
1031
+ # The actual filter processor. Not meant for direct use
1032
+ #
1033
+ # source://simplecov//lib/simplecov/configuration.rb#490
1034
+ def parse_filter(filter_argument = T.unsafe(nil), &filter_proc); end
1035
+
1036
+ # source://simplecov//lib/simplecov/configuration.rb#466
1037
+ def raise_if_criterion_disabled(criterion); end
1038
+
1039
+ # source://simplecov//lib/simplecov/configuration.rb#475
1040
+ def raise_if_criterion_unsupported(criterion); end
1041
+ end
1042
+
1043
+ # source://simplecov//lib/simplecov/configuration.rb#381
1044
+ SimpleCov::Configuration::DEFAULT_COVERAGE_CRITERION = T.let(T.unsafe(nil), Symbol)
1045
+
1046
+ # source://simplecov//lib/simplecov/configuration.rb#380
1047
+ SimpleCov::Configuration::SUPPORTED_COVERAGE_CRITERIA = T.let(T.unsafe(nil), Array)
1048
+
1049
+ # Holds the individual data of a coverage result.
1050
+ #
1051
+ # This is uniform across coverage criteria as they all have:
1052
+ #
1053
+ # * total - how many things to cover there are (total relevant loc/branches)
1054
+ # * covered - how many of the coverables are hit
1055
+ # * missed - how many of the coverables are missed
1056
+ # * percent - percentage as covered/missed
1057
+ # * strength - average hits per/coverable (will not exist for one shot lines format)
1058
+ #
1059
+ # source://simplecov//lib/simplecov/coverage_statistics.rb#13
1060
+ class SimpleCov::CoverageStatistics
1061
+ # Requires only covered, missed and strength to be initialized.
1062
+ #
1063
+ # Other values are computed by this class.
1064
+ #
1065
+ # @return [CoverageStatistics] a new instance of CoverageStatistics
1066
+ #
1067
+ # source://simplecov//lib/simplecov/coverage_statistics.rb#34
1068
+ def initialize(covered:, missed:, total_strength: T.unsafe(nil)); end
1069
+
1070
+ # Returns the value of attribute covered.
1071
+ #
1072
+ # source://simplecov//lib/simplecov/coverage_statistics.rb#14
1073
+ def covered; end
1074
+
1075
+ # Returns the value of attribute missed.
1076
+ #
1077
+ # source://simplecov//lib/simplecov/coverage_statistics.rb#14
1078
+ def missed; end
1079
+
1080
+ # Returns the value of attribute percent.
1081
+ #
1082
+ # source://simplecov//lib/simplecov/coverage_statistics.rb#14
1083
+ def percent; end
1084
+
1085
+ # Returns the value of attribute strength.
1086
+ #
1087
+ # source://simplecov//lib/simplecov/coverage_statistics.rb#14
1088
+ def strength; end
1089
+
1090
+ # Returns the value of attribute total.
1091
+ #
1092
+ # source://simplecov//lib/simplecov/coverage_statistics.rb#14
1093
+ def total; end
1094
+
1095
+ private
1096
+
1097
+ # source://simplecov//lib/simplecov/coverage_statistics.rb#44
1098
+ def compute_percent(covered, missed, total); end
1099
+
1100
+ # source://simplecov//lib/simplecov/coverage_statistics.rb#50
1101
+ def compute_strength(total_strength, total); end
1102
+
1103
+ class << self
1104
+ # source://simplecov//lib/simplecov/coverage_statistics.rb#16
1105
+ def from(coverage_statistics); end
1106
+ end
1107
+ end
1108
+
1109
+ # source://simplecov//lib/simplecov/exit_codes.rb#4
1110
+ module SimpleCov::ExitCodes; end
1111
+
1112
+ # source://simplecov//lib/simplecov/exit_codes.rb#6
1113
+ SimpleCov::ExitCodes::EXCEPTION = T.let(T.unsafe(nil), Integer)
1114
+
1115
+ # source://simplecov//lib/simplecov/exit_codes/exit_code_handling.rb#5
1116
+ module SimpleCov::ExitCodes::ExitCodeHandling
1117
+ private
1118
+
1119
+ # source://simplecov//lib/simplecov/exit_codes/exit_code_handling.rb#8
1120
+ def call(result, coverage_limits:); end
1121
+
1122
+ # source://simplecov//lib/simplecov/exit_codes/exit_code_handling.rb#20
1123
+ def coverage_checks(result, coverage_limits); end
1124
+
1125
+ class << self
1126
+ # source://simplecov//lib/simplecov/exit_codes/exit_code_handling.rb#8
1127
+ def call(result, coverage_limits:); end
1128
+
1129
+ # source://simplecov//lib/simplecov/exit_codes/exit_code_handling.rb#20
1130
+ def coverage_checks(result, coverage_limits); end
1131
+ end
1132
+ end
1133
+
1134
+ # source://simplecov//lib/simplecov/exit_codes.rb#8
1135
+ SimpleCov::ExitCodes::MAXIMUM_COVERAGE_DROP = T.let(T.unsafe(nil), Integer)
1136
+
1137
+ # source://simplecov//lib/simplecov/exit_codes.rb#7
1138
+ SimpleCov::ExitCodes::MINIMUM_COVERAGE = T.let(T.unsafe(nil), Integer)
1139
+
1140
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#5
1141
+ class SimpleCov::ExitCodes::MaximumCoverageDropCheck
1142
+ # @return [MaximumCoverageDropCheck] a new instance of MaximumCoverageDropCheck
1143
+ #
1144
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#6
1145
+ def initialize(result, maximum_coverage_drop); end
1146
+
1147
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#28
1148
+ def exit_code; end
1149
+
1150
+ # @return [Boolean]
1151
+ #
1152
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#11
1153
+ def failing?; end
1154
+
1155
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#17
1156
+ def report; end
1157
+
1158
+ private
1159
+
1160
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#49
1161
+ def compute_coverage_drop_data; end
1162
+
1163
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#42
1164
+ def coverage_drop_violations; end
1165
+
1166
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#61
1167
+ def drop_percent(criterion); end
1168
+
1169
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#73
1170
+ def last_coverage(criterion); end
1171
+
1172
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#36
1173
+ def last_run; end
1174
+
1175
+ # Returns the value of attribute maximum_coverage_drop.
1176
+ #
1177
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#34
1178
+ def maximum_coverage_drop; end
1179
+
1180
+ # Returns the value of attribute result.
1181
+ #
1182
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#34
1183
+ def result; end
1184
+ end
1185
+
1186
+ # if anyone says "max_coverage_drop 0.000000000000000001" I appologize. Please don't.
1187
+ #
1188
+ # source://simplecov//lib/simplecov/exit_codes/maximum_coverage_drop_check.rb#60
1189
+ SimpleCov::ExitCodes::MaximumCoverageDropCheck::MAX_DROP_ACCURACY = T.let(T.unsafe(nil), Integer)
1190
+
1191
+ # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#5
1192
+ class SimpleCov::ExitCodes::MinimumCoverageByFileCheck
1193
+ # @return [MinimumCoverageByFileCheck] a new instance of MinimumCoverageByFileCheck
1194
+ #
1195
+ # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#6
1196
+ def initialize(result, minimum_coverage_by_file); end
1197
+
1198
+ # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#26
1199
+ def exit_code; end
1200
+
1201
+ # @return [Boolean]
1202
+ #
1203
+ # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#11
1204
+ def failing?; end
1205
+
1206
+ # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#15
1207
+ def report; end
1208
+
1209
+ private
1210
+
1211
+ # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#41
1212
+ def compute_minimum_coverage_data; end
1213
+
1214
+ # Returns the value of attribute minimum_coverage_by_file.
1215
+ #
1216
+ # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#32
1217
+ def minimum_coverage_by_file; end
1218
+
1219
+ # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#34
1220
+ def minimum_violations; end
1221
+
1222
+ # Returns the value of attribute result.
1223
+ #
1224
+ # source://simplecov//lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb#32
1225
+ def result; end
1226
+ end
1227
+
1228
+ # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#5
1229
+ class SimpleCov::ExitCodes::MinimumOverallCoverageCheck
1230
+ # @return [MinimumOverallCoverageCheck] a new instance of MinimumOverallCoverageCheck
1231
+ #
1232
+ # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#6
1233
+ def initialize(result, minimum_coverage); end
1234
+
1235
+ # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#26
1236
+ def exit_code; end
1237
+
1238
+ # @return [Boolean]
1239
+ #
1240
+ # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#11
1241
+ def failing?; end
1242
+
1243
+ # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#15
1244
+ def report; end
1245
+
1246
+ private
1247
+
1248
+ # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#38
1249
+ def calculate_minimum_violations; end
1250
+
1251
+ # Returns the value of attribute minimum_coverage.
1252
+ #
1253
+ # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#32
1254
+ def minimum_coverage; end
1255
+
1256
+ # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#34
1257
+ def minimum_violations; end
1258
+
1259
+ # Returns the value of attribute result.
1260
+ #
1261
+ # source://simplecov//lib/simplecov/exit_codes/minimum_overall_coverage_check.rb#32
1262
+ def result; end
1263
+ end
1264
+
1265
+ # source://simplecov//lib/simplecov/exit_codes.rb#5
1266
+ SimpleCov::ExitCodes::SUCCESS = T.let(T.unsafe(nil), Integer)
1267
+
1268
+ # An array of SimpleCov SourceFile instances with additional collection helper
1269
+ # methods for calculating coverage across them etc.
1270
+ #
1271
+ # source://simplecov//lib/simplecov/file_list.rb#6
1272
+ class SimpleCov::FileList
1273
+ include ::Enumerable
1274
+ extend ::Forwardable
1275
+
1276
+ # @return [FileList] a new instance of FileList
1277
+ #
1278
+ # source://simplecov//lib/simplecov/file_list.rb#22
1279
+ def initialize(files); end
1280
+
1281
+ # source://simplecov//lib/simplecov/file_list.rb#101
1282
+ def branch_covered_percent; end
1283
+
1284
+ # source://forwardable/1.3.3/forwardable.rb#231
1285
+ def count(*args, **_arg1, &block); end
1286
+
1287
+ # source://simplecov//lib/simplecov/file_list.rb#26
1288
+ def coverage_statistics; end
1289
+
1290
+ # source://simplecov//lib/simplecov/file_list.rb#30
1291
+ def coverage_statistics_by_file; end
1292
+
1293
+ # Return total count of covered branches
1294
+ #
1295
+ # source://simplecov//lib/simplecov/file_list.rb#92
1296
+ def covered_branches; end
1297
+
1298
+ # Returns the count of lines that have coverage
1299
+ #
1300
+ # source://simplecov//lib/simplecov/file_list.rb#35
1301
+ def covered_lines; end
1302
+
1303
+ # Computes the coverage based upon lines covered and lines missed
1304
+ #
1305
+ # @return [Float]
1306
+ #
1307
+ # source://simplecov//lib/simplecov/file_list.rb#76
1308
+ def covered_percent; end
1309
+
1310
+ # Computes the coverage based upon lines covered and lines missed for each file
1311
+ # Returns an array with all coverage percentages
1312
+ #
1313
+ # source://simplecov//lib/simplecov/file_list.rb#60
1314
+ def covered_percentages; end
1315
+
1316
+ # Computes the strength (hits / line) based upon lines covered and lines missed
1317
+ #
1318
+ # @return [Float]
1319
+ #
1320
+ # source://simplecov//lib/simplecov/file_list.rb#82
1321
+ def covered_strength; end
1322
+
1323
+ # source://forwardable/1.3.3/forwardable.rb#231
1324
+ def each(*args, **_arg1, &block); end
1325
+
1326
+ # source://forwardable/1.3.3/forwardable.rb#231
1327
+ def empty?(*args, **_arg1, &block); end
1328
+
1329
+ # Finds the least covered file and returns that file's name
1330
+ #
1331
+ # source://simplecov//lib/simplecov/file_list.rb#65
1332
+ def least_covered_file; end
1333
+
1334
+ # source://forwardable/1.3.3/forwardable.rb#231
1335
+ def length(*args, **_arg1, &block); end
1336
+
1337
+ # Returns the overall amount of relevant lines of code across all files in this list
1338
+ #
1339
+ # source://simplecov//lib/simplecov/file_list.rb#70
1340
+ def lines_of_code; end
1341
+
1342
+ # source://forwardable/1.3.3/forwardable.rb#231
1343
+ def map(*args, **_arg1, &block); end
1344
+
1345
+ # Return total count of covered branches
1346
+ #
1347
+ # source://simplecov//lib/simplecov/file_list.rb#97
1348
+ def missed_branches; end
1349
+
1350
+ # Returns the count of lines that have been missed
1351
+ #
1352
+ # source://simplecov//lib/simplecov/file_list.rb#40
1353
+ def missed_lines; end
1354
+
1355
+ # Returns the count of lines that are not relevant for coverage
1356
+ #
1357
+ # source://simplecov//lib/simplecov/file_list.rb#45
1358
+ def never_lines; end
1359
+
1360
+ # source://forwardable/1.3.3/forwardable.rb#231
1361
+ def size(*args, **_arg1, &block); end
1362
+
1363
+ # Returns the count of skipped lines
1364
+ #
1365
+ # source://simplecov//lib/simplecov/file_list.rb#52
1366
+ def skipped_lines; end
1367
+
1368
+ # source://forwardable/1.3.3/forwardable.rb#231
1369
+ def to_a(*args, **_arg1, &block); end
1370
+
1371
+ # source://forwardable/1.3.3/forwardable.rb#231
1372
+ def to_ary(*args, **_arg1, &block); end
1373
+
1374
+ # Return total count of branches in all files
1375
+ #
1376
+ # source://simplecov//lib/simplecov/file_list.rb#87
1377
+ def total_branches; end
1378
+
1379
+ private
1380
+
1381
+ # source://simplecov//lib/simplecov/file_list.rb#114
1382
+ def compute_coverage_statistics; end
1383
+
1384
+ # source://simplecov//lib/simplecov/file_list.rb#107
1385
+ def compute_coverage_statistics_by_file; end
1386
+ end
1387
+
1388
+ # Base filter class. Inherit from this to create custom filters,
1389
+ # and overwrite the passes?(source_file) instance method
1390
+ #
1391
+ # # A sample class that rejects all source files.
1392
+ # class StupidFilter < SimpleCov::Filter
1393
+ # def passes?(source_file)
1394
+ # false
1395
+ # end
1396
+ # end
1397
+ #
1398
+ # source://simplecov//lib/simplecov/filter.rb#15
1399
+ class SimpleCov::Filter
1400
+ # @return [Filter] a new instance of Filter
1401
+ #
1402
+ # source://simplecov//lib/simplecov/filter.rb#18
1403
+ def initialize(filter_argument); end
1404
+
1405
+ # Returns the value of attribute filter_argument.
1406
+ #
1407
+ # source://simplecov//lib/simplecov/filter.rb#16
1408
+ def filter_argument; end
1409
+
1410
+ # @return [Boolean]
1411
+ #
1412
+ # source://simplecov//lib/simplecov/filter.rb#22
1413
+ def matches?(_source_file); end
1414
+
1415
+ # @return [Boolean]
1416
+ #
1417
+ # source://simplecov//lib/simplecov/filter.rb#26
1418
+ def passes?(source_file); end
1419
+
1420
+ class << self
1421
+ # source://simplecov//lib/simplecov/filter.rb#31
1422
+ def build_filter(filter_argument); end
1423
+
1424
+ # source://simplecov//lib/simplecov/filter.rb#37
1425
+ def class_for_argument(filter_argument); end
1426
+ end
1427
+ end
1428
+
1429
+ # TODO: Documentation on how to build your own formatters
1430
+ #
1431
+ # source://simplecov//lib/simplecov/formatter/multi_formatter.rb#4
1432
+ module SimpleCov::Formatter
1433
+ class << self
1434
+ # source://simplecov//lib/simplecov/default_formatter.rb#7
1435
+ def from_env(env); end
1436
+ end
1437
+ end
1438
+
1439
+ # source://simplecov//lib/simplecov/formatter/multi_formatter.rb#5
1440
+ class SimpleCov::Formatter::MultiFormatter
1441
+ class << self
1442
+ # source://simplecov//lib/simplecov/formatter/multi_formatter.rb#26
1443
+ def [](*args); end
1444
+
1445
+ # source://simplecov//lib/simplecov/formatter/multi_formatter.rb#17
1446
+ def new(formatters = T.unsafe(nil)); end
1447
+ end
1448
+ end
1449
+
1450
+ # source://simplecov//lib/simplecov/formatter/multi_formatter.rb#6
1451
+ module SimpleCov::Formatter::MultiFormatter::InstanceMethods
1452
+ # source://simplecov//lib/simplecov/formatter/multi_formatter.rb#7
1453
+ def format(result); end
1454
+ end
1455
+
1456
+ # A ridiculously simple formatter for SimpleCov results.
1457
+ #
1458
+ # source://simplecov//lib/simplecov/formatter/simple_formatter.rb#8
1459
+ class SimpleCov::Formatter::SimpleFormatter
1460
+ # Takes a SimpleCov::Result and generates a string out of it
1461
+ #
1462
+ # source://simplecov//lib/simplecov/formatter/simple_formatter.rb#10
1463
+ def format(result); end
1464
+ end
1465
+
1466
+ # source://simplecov//lib/simplecov/last_run.rb#6
1467
+ module SimpleCov::LastRun
1468
+ class << self
1469
+ # source://simplecov//lib/simplecov/last_run.rb#8
1470
+ def last_run_path; end
1471
+
1472
+ # source://simplecov//lib/simplecov/last_run.rb#12
1473
+ def read; end
1474
+
1475
+ # source://simplecov//lib/simplecov/last_run.rb#21
1476
+ def write(json); end
1477
+ end
1478
+ end
1479
+
1480
+ # Classifies whether lines are relevant for code coverage analysis.
1481
+ # Comments & whitespace lines, and :nocov: token blocks, are considered not relevant.
1482
+ #
1483
+ # source://simplecov//lib/simplecov/lines_classifier.rb#7
1484
+ class SimpleCov::LinesClassifier
1485
+ # source://simplecov//lib/simplecov/lines_classifier.rb#33
1486
+ def classify(lines); end
1487
+
1488
+ class << self
1489
+ # source://simplecov//lib/simplecov/lines_classifier.rb#15
1490
+ def no_cov_line; end
1491
+
1492
+ # @return [Boolean]
1493
+ #
1494
+ # source://simplecov//lib/simplecov/lines_classifier.rb#19
1495
+ def no_cov_line?(line); end
1496
+
1497
+ # @return [Boolean]
1498
+ #
1499
+ # source://simplecov//lib/simplecov/lines_classifier.rb#26
1500
+ def whitespace_line?(line); end
1501
+ end
1502
+ end
1503
+
1504
+ # source://simplecov//lib/simplecov/lines_classifier.rb#12
1505
+ SimpleCov::LinesClassifier::COMMENT_LINE = T.let(T.unsafe(nil), Regexp)
1506
+
1507
+ # source://simplecov//lib/simplecov/lines_classifier.rb#9
1508
+ SimpleCov::LinesClassifier::NOT_RELEVANT = T.let(T.unsafe(nil), T.untyped)
1509
+
1510
+ # source://simplecov//lib/simplecov/lines_classifier.rb#8
1511
+ SimpleCov::LinesClassifier::RELEVANT = T.let(T.unsafe(nil), Integer)
1512
+
1513
+ # source://simplecov//lib/simplecov/lines_classifier.rb#11
1514
+ SimpleCov::LinesClassifier::WHITESPACE_LINE = T.let(T.unsafe(nil), Regexp)
1515
+
1516
+ # source://simplecov//lib/simplecov/lines_classifier.rb#13
1517
+ SimpleCov::LinesClassifier::WHITESPACE_OR_COMMENT_LINE = T.let(T.unsafe(nil), Regexp)
1518
+
1519
+ # Profiles are SimpleCov configuration procs that can be easily
1520
+ # loaded using SimpleCov.start :rails and defined using
1521
+ # SimpleCov.profiles.define :foo do
1522
+ # # SimpleCov configuration here, same as in SimpleCov.configure
1523
+ # end
1524
+ #
1525
+ # source://simplecov//lib/simplecov/profiles.rb#11
1526
+ class SimpleCov::Profiles < ::Hash
1527
+ # Define a SimpleCov profile:
1528
+ # SimpleCov.profiles.define 'rails' do
1529
+ # # Same as SimpleCov.configure do .. here
1530
+ # end
1531
+ #
1532
+ # source://simplecov//lib/simplecov/profiles.rb#18
1533
+ def define(name, &blk); end
1534
+
1535
+ # Applies the profile of given name on SimpleCov.configure
1536
+ #
1537
+ # source://simplecov//lib/simplecov/profiles.rb#28
1538
+ def load(name); end
1539
+ end
1540
+
1541
+ # source://simplecov//lib/simplecov/filter.rb#61
1542
+ class SimpleCov::RegexFilter < ::SimpleCov::Filter
1543
+ # Returns true when the given source file's filename matches the
1544
+ # regex configured when initializing this Filter with RegexFilter.new(/someregex/)
1545
+ #
1546
+ # @return [Boolean]
1547
+ #
1548
+ # source://simplecov//lib/simplecov/filter.rb#64
1549
+ def matches?(source_file); end
1550
+ end
1551
+
1552
+ # A simplecov code coverage result, initialized from the Hash Ruby's built-in coverage
1553
+ # library generates (Coverage.result).
1554
+ #
1555
+ # source://simplecov//lib/simplecov/result.rb#11
1556
+ class SimpleCov::Result
1557
+ extend ::Forwardable
1558
+
1559
+ # Initialize a new SimpleCov::Result from given Coverage.result (a Hash of filenames each containing an array of
1560
+ # coverage data)
1561
+ #
1562
+ # @return [Result] a new instance of Result
1563
+ #
1564
+ # source://simplecov//lib/simplecov/result.rb#28
1565
+ def initialize(original_result, command_name: T.unsafe(nil), created_at: T.unsafe(nil)); end
1566
+
1567
+ # The command name that launched this result.
1568
+ # Delegated to SimpleCov.command_name if not set manually
1569
+ #
1570
+ # source://simplecov//lib/simplecov/result.rb#61
1571
+ def command_name; end
1572
+
1573
+ # Explicitly set the command name that was used for this coverage result. Defaults to SimpleCov.command_name
1574
+ #
1575
+ # source://simplecov//lib/simplecov/result.rb#21
1576
+ def command_name=(_arg0); end
1577
+
1578
+ # source://forwardable/1.3.3/forwardable.rb#231
1579
+ def coverage_statistics(*args, **_arg1, &block); end
1580
+
1581
+ # source://forwardable/1.3.3/forwardable.rb#231
1582
+ def coverage_statistics_by_file(*args, **_arg1, &block); end
1583
+
1584
+ # source://forwardable/1.3.3/forwardable.rb#231
1585
+ def covered_branches(*args, **_arg1, &block); end
1586
+
1587
+ # source://forwardable/1.3.3/forwardable.rb#231
1588
+ def covered_lines(*args, **_arg1, &block); end
1589
+
1590
+ # source://forwardable/1.3.3/forwardable.rb#231
1591
+ def covered_percent(*args, **_arg1, &block); end
1592
+
1593
+ # source://forwardable/1.3.3/forwardable.rb#231
1594
+ def covered_percentages(*args, **_arg1, &block); end
1595
+
1596
+ # source://forwardable/1.3.3/forwardable.rb#231
1597
+ def covered_strength(*args, **_arg1, &block); end
1598
+
1599
+ # Defines when this result has been created. Defaults to Time.now
1600
+ #
1601
+ # source://simplecov//lib/simplecov/result.rb#55
1602
+ def created_at; end
1603
+
1604
+ # Explicitly set the Time this result has been created
1605
+ #
1606
+ # source://simplecov//lib/simplecov/result.rb#19
1607
+ def created_at=(_arg0); end
1608
+
1609
+ # Returns all filenames for source files contained in this result
1610
+ #
1611
+ # source://simplecov//lib/simplecov/result.rb#40
1612
+ def filenames; end
1613
+
1614
+ # Returns all files that are applicable to this result (sans filters!) as instances of SimpleCov::SourceFile. Aliased as :source_files
1615
+ #
1616
+ # source://simplecov//lib/simplecov/result.rb#16
1617
+ def files; end
1618
+
1619
+ # Applies the configured SimpleCov.formatter on this result
1620
+ #
1621
+ # source://simplecov//lib/simplecov/result.rb#50
1622
+ def format!; end
1623
+
1624
+ # Returns a Hash of groups for this result. Define groups using SimpleCov.add_group 'Models', 'app/models'
1625
+ #
1626
+ # source://simplecov//lib/simplecov/result.rb#45
1627
+ def groups; end
1628
+
1629
+ # source://forwardable/1.3.3/forwardable.rb#231
1630
+ def least_covered_file(*args, **_arg1, &block); end
1631
+
1632
+ # source://forwardable/1.3.3/forwardable.rb#231
1633
+ def missed_branches(*args, **_arg1, &block); end
1634
+
1635
+ # source://forwardable/1.3.3/forwardable.rb#231
1636
+ def missed_lines(*args, **_arg1, &block); end
1637
+
1638
+ # Returns the original Coverage.result used for this instance of SimpleCov::Result
1639
+ #
1640
+ # source://simplecov//lib/simplecov/result.rb#14
1641
+ def original_result; end
1642
+
1643
+ # Returns all files that are applicable to this result (sans filters!) as instances of SimpleCov::SourceFile. Aliased as :source_files
1644
+ #
1645
+ # source://simplecov//lib/simplecov/result.rb#16
1646
+ def source_files; end
1647
+
1648
+ # Returns a hash representation of this Result that can be used for marshalling it into JSON
1649
+ #
1650
+ # source://simplecov//lib/simplecov/result.rb#66
1651
+ def to_hash; end
1652
+
1653
+ # source://forwardable/1.3.3/forwardable.rb#231
1654
+ def total_branches(*args, **_arg1, &block); end
1655
+
1656
+ # source://forwardable/1.3.3/forwardable.rb#231
1657
+ def total_lines(*args, **_arg1, &block); end
1658
+
1659
+ private
1660
+
1661
+ # source://simplecov//lib/simplecov/result.rb#84
1662
+ def coverage; end
1663
+
1664
+ # Applies all configured SimpleCov filters on this result's source files
1665
+ #
1666
+ # source://simplecov//lib/simplecov/result.rb#90
1667
+ def filter!; end
1668
+
1669
+ class << self
1670
+ # Loads a SimpleCov::Result#to_hash dump
1671
+ #
1672
+ # source://simplecov//lib/simplecov/result.rb#76
1673
+ def from_hash(hash); end
1674
+ end
1675
+ end
1676
+
1677
+ # Responsible for adapting the format of the coverage result whether it's default or with statistics
1678
+ #
1679
+ # source://simplecov//lib/simplecov/result_adapter.rb#7
1680
+ class SimpleCov::ResultAdapter
1681
+ # @return [ResultAdapter] a new instance of ResultAdapter
1682
+ #
1683
+ # source://simplecov//lib/simplecov/result_adapter.rb#10
1684
+ def initialize(result); end
1685
+
1686
+ # source://simplecov//lib/simplecov/result_adapter.rb#18
1687
+ def adapt; end
1688
+
1689
+ # Returns the value of attribute result.
1690
+ #
1691
+ # source://simplecov//lib/simplecov/result_adapter.rb#8
1692
+ def result; end
1693
+
1694
+ class << self
1695
+ # source://simplecov//lib/simplecov/result_adapter.rb#14
1696
+ def call(*args); end
1697
+ end
1698
+ end
1699
+
1700
+ # Singleton that is responsible for caching, loading and merging
1701
+ # SimpleCov::Results into a single result for coverage analysis based
1702
+ # upon multiple test suites.
1703
+ #
1704
+ # source://simplecov//lib/simplecov/result_merger.rb#11
1705
+ module SimpleCov::ResultMerger
1706
+ class << self
1707
+ # source://simplecov//lib/simplecov/result_merger.rb#187
1708
+ def adapt_pre_simplecov_0_18_result(result); end
1709
+
1710
+ # We changed the format of the raw result data in simplecov, as people are likely
1711
+ # to have "old" resultsets lying around (but not too old so that they're still
1712
+ # considered we can adapt them).
1713
+ # See https://github.com/simplecov-ruby/simplecov/pull/824#issuecomment-576049747
1714
+ #
1715
+ # source://simplecov//lib/simplecov/result_merger.rb#172
1716
+ def adapt_result(result); end
1717
+
1718
+ # source://simplecov//lib/simplecov/result_merger.rb#93
1719
+ def create_result(command_names, coverage); end
1720
+
1721
+ # source://simplecov//lib/simplecov/result_merger.rb#22
1722
+ def merge_and_store(*file_paths, ignore_timeout: T.unsafe(nil)); end
1723
+
1724
+ # source://simplecov//lib/simplecov/result_merger.rb#100
1725
+ def merge_coverage(*results); end
1726
+
1727
+ # source://simplecov//lib/simplecov/result_merger.rb#28
1728
+ def merge_results(*file_paths, ignore_timeout: T.unsafe(nil)); end
1729
+
1730
+ # source://simplecov//lib/simplecov/result_merger.rb#74
1731
+ def merge_valid_results(results, ignore_timeout: T.unsafe(nil)); end
1732
+
1733
+ # Gets all SimpleCov::Results stored in resultset, merges them and produces a new
1734
+ # SimpleCov::Result with merged coverage data and the command_name
1735
+ # for the result consisting of a join on all source result's names
1736
+ #
1737
+ # source://simplecov//lib/simplecov/result_merger.rb#117
1738
+ def merged_result; end
1739
+
1740
+ # source://simplecov//lib/simplecov/result_merger.rb#51
1741
+ def parse_file(path); end
1742
+
1743
+ # source://simplecov//lib/simplecov/result_merger.rb#65
1744
+ def parse_json(content); end
1745
+
1746
+ # pre 0.18 coverage data pointed from file directly to an array of line coverage
1747
+ #
1748
+ # @return [Boolean]
1749
+ #
1750
+ # source://simplecov//lib/simplecov/result_merger.rb#181
1751
+ def pre_simplecov_0_18_result?(result); end
1752
+
1753
+ # source://simplecov//lib/simplecov/result_merger.rb#56
1754
+ def read_file(path); end
1755
+
1756
+ # source://simplecov//lib/simplecov/result_merger.rb#126
1757
+ def read_resultset; end
1758
+
1759
+ # The path to the .resultset.json cache file
1760
+ #
1761
+ # source://simplecov//lib/simplecov/result_merger.rb#14
1762
+ def resultset_path; end
1763
+
1764
+ # source://simplecov//lib/simplecov/result_merger.rb#18
1765
+ def resultset_writelock; end
1766
+
1767
+ # Saves the given SimpleCov::Result in the resultset cache
1768
+ #
1769
+ # source://simplecov//lib/simplecov/result_merger.rb#136
1770
+ def store_result(result); end
1771
+
1772
+ # Ensure only one process is reading or writing the resultset at any
1773
+ # given time
1774
+ #
1775
+ # source://simplecov//lib/simplecov/result_merger.rb#153
1776
+ def synchronize_resultset; end
1777
+
1778
+ # source://simplecov//lib/simplecov/result_merger.rb#89
1779
+ def time_since_result_creation(data); end
1780
+
1781
+ # source://simplecov//lib/simplecov/result_merger.rb#46
1782
+ def valid_results(file_path, ignore_timeout: T.unsafe(nil)); end
1783
+
1784
+ # @return [Boolean]
1785
+ #
1786
+ # source://simplecov//lib/simplecov/result_merger.rb#85
1787
+ def within_merge_timeout?(data); end
1788
+ end
1789
+ end
1790
+
1791
+ # Responsible for producing file coverage metrics.
1792
+ #
1793
+ # source://simplecov//lib/simplecov/simulate_coverage.rb#7
1794
+ module SimpleCov::SimulateCoverage
1795
+ private
1796
+
1797
+ # Simulate normal file coverage report on
1798
+ # ruby 2.5 and return similar hash with lines and branches keys
1799
+ #
1800
+ # Happens when a file wasn't required but still tracked.
1801
+ #
1802
+ # @return [Hash]
1803
+ #
1804
+ # source://simplecov//lib/simplecov/simulate_coverage.rb#18
1805
+ def call(absolute_path); end
1806
+
1807
+ class << self
1808
+ # Simulate normal file coverage report on
1809
+ # ruby 2.5 and return similar hash with lines and branches keys
1810
+ #
1811
+ # Happens when a file wasn't required but still tracked.
1812
+ #
1813
+ # @return [Hash]
1814
+ #
1815
+ # source://simplecov//lib/simplecov/simulate_coverage.rb#18
1816
+ def call(absolute_path); end
1817
+ end
1818
+ end
1819
+
1820
+ # Representation of a source file including it's coverage data, source code,
1821
+ # source lines and featuring helpers to interpret that data.
1822
+ #
1823
+ # source://simplecov//lib/simplecov/source_file/line.rb#4
1824
+ class SimpleCov::SourceFile
1825
+ # @return [SourceFile] a new instance of SourceFile
1826
+ #
1827
+ # source://simplecov//lib/simplecov/source_file.rb#14
1828
+ def initialize(filename, coverage_data); end
1829
+
1830
+ # Return all the branches inside current source file
1831
+ #
1832
+ # source://simplecov//lib/simplecov/source_file.rb#98
1833
+ def branches; end
1834
+
1835
+ # source://simplecov//lib/simplecov/source_file.rb#106
1836
+ def branches_coverage_percent; end
1837
+
1838
+ # source://simplecov//lib/simplecov/source_file.rb#142
1839
+ def branches_for_line(line_number); end
1840
+
1841
+ # Return hash with key of line number and branch coverage count as value
1842
+ #
1843
+ # source://simplecov//lib/simplecov/source_file.rb#118
1844
+ def branches_report; end
1845
+
1846
+ # The array of coverage data received from the Coverage.result
1847
+ #
1848
+ # source://simplecov//lib/simplecov/source_file.rb#12
1849
+ def coverage_data; end
1850
+
1851
+ # source://simplecov//lib/simplecov/source_file.rb#32
1852
+ def coverage_statistics; end
1853
+
1854
+ # Select the covered branches
1855
+ # Here we user tree schema because some conditions like case may have additional
1856
+ # else that is not in declared inside the code but given by default by coverage report
1857
+ #
1858
+ # @return [Array]
1859
+ #
1860
+ # source://simplecov//lib/simplecov/source_file.rb#129
1861
+ def covered_branches; end
1862
+
1863
+ # Returns all covered lines as SimpleCov::SourceFile::Line
1864
+ #
1865
+ # source://simplecov//lib/simplecov/source_file.rb#48
1866
+ def covered_lines; end
1867
+
1868
+ # The coverage for this file in percent. 0 if the file has no coverage lines
1869
+ #
1870
+ # source://simplecov//lib/simplecov/source_file.rb#80
1871
+ def covered_percent; end
1872
+
1873
+ # source://simplecov//lib/simplecov/source_file.rb#84
1874
+ def covered_strength; end
1875
+
1876
+ # The full path to this source file (e.g. /User/colszowka/projects/simplecov/lib/simplecov/source_file.rb)
1877
+ #
1878
+ # source://simplecov//lib/simplecov/source_file.rb#10
1879
+ def filename; end
1880
+
1881
+ # Access SimpleCov::SourceFile::Line source lines by line number
1882
+ #
1883
+ # source://simplecov//lib/simplecov/source_file.rb#75
1884
+ def line(number); end
1885
+
1886
+ # Check if any branches missing on given line number
1887
+ #
1888
+ # @param line_number [Integer]
1889
+ # @return [Boolean]
1890
+ #
1891
+ # source://simplecov//lib/simplecov/source_file.rb#153
1892
+ def line_with_missed_branch?(line_number); end
1893
+
1894
+ # Returns all source lines for this file as instances of SimpleCov::SourceFile::Line,
1895
+ # and thus including coverage data. Aliased as :source_lines
1896
+ #
1897
+ # source://simplecov//lib/simplecov/source_file.rb#42
1898
+ def lines; end
1899
+
1900
+ # Returns the number of relevant lines (covered + missed)
1901
+ #
1902
+ # source://simplecov//lib/simplecov/source_file.rb#70
1903
+ def lines_of_code; end
1904
+
1905
+ # Select the missed branches with coverage equal to zero
1906
+ #
1907
+ # @return [Array]
1908
+ #
1909
+ # source://simplecov//lib/simplecov/source_file.rb#138
1910
+ def missed_branches; end
1911
+
1912
+ # Returns all lines that should have been, but were not covered
1913
+ # as instances of SimpleCov::SourceFile::Line
1914
+ #
1915
+ # source://simplecov//lib/simplecov/source_file.rb#54
1916
+ def missed_lines; end
1917
+
1918
+ # Returns all lines that are not relevant for coverage as
1919
+ # SimpleCov::SourceFile::Line instances
1920
+ #
1921
+ # source://simplecov//lib/simplecov/source_file.rb#60
1922
+ def never_lines; end
1923
+
1924
+ # @return [Boolean]
1925
+ #
1926
+ # source://simplecov//lib/simplecov/source_file.rb#102
1927
+ def no_branches?; end
1928
+
1929
+ # @return [Boolean]
1930
+ #
1931
+ # source://simplecov//lib/simplecov/source_file.rb#88
1932
+ def no_lines?; end
1933
+
1934
+ # The path to this source file relative to the projects directory
1935
+ #
1936
+ # source://simplecov//lib/simplecov/source_file.rb#20
1937
+ def project_filename; end
1938
+
1939
+ # source://simplecov//lib/simplecov/source_file.rb#92
1940
+ def relevant_lines; end
1941
+
1942
+ # Returns all lines that were skipped as SimpleCov::SourceFile::Line instances
1943
+ #
1944
+ # source://simplecov//lib/simplecov/source_file.rb#65
1945
+ def skipped_lines; end
1946
+
1947
+ # The source code for this file. Aliased as :source
1948
+ #
1949
+ # source://simplecov//lib/simplecov/source_file.rb#25
1950
+ def source; end
1951
+
1952
+ # Returns all source lines for this file as instances of SimpleCov::SourceFile::Line,
1953
+ # and thus including coverage data. Aliased as :source_lines
1954
+ #
1955
+ # source://simplecov//lib/simplecov/source_file.rb#42
1956
+ def source_lines; end
1957
+
1958
+ # The source code for this file. Aliased as :source
1959
+ #
1960
+ # source://simplecov//lib/simplecov/source_file.rb#25
1961
+ def src; end
1962
+
1963
+ # Return the relevant branches to source file
1964
+ #
1965
+ # source://simplecov//lib/simplecov/source_file.rb#112
1966
+ def total_branches; end
1967
+
1968
+ private
1969
+
1970
+ # source://simplecov//lib/simplecov/source_file.rb#346
1971
+ def branch_coverage_statistics; end
1972
+
1973
+ # source://simplecov//lib/simplecov/source_file.rb#324
1974
+ def build_branch(branch_data, hit_count, condition_start_line); end
1975
+
1976
+ # Call recursive method that transform our static hash to array of objects
1977
+ #
1978
+ # @return [Array]
1979
+ #
1980
+ # source://simplecov//lib/simplecov/source_file.rb#273
1981
+ def build_branches; end
1982
+
1983
+ # source://simplecov//lib/simplecov/source_file.rb#310
1984
+ def build_branches_from(condition, branches); end
1985
+
1986
+ # Build full branches report
1987
+ # Root branches represent the wrapper of all condition state that
1988
+ # have inside the branches
1989
+ #
1990
+ # @return [Hash]
1991
+ #
1992
+ # source://simplecov//lib/simplecov/source_file.rb#262
1993
+ def build_branches_report; end
1994
+
1995
+ # source://simplecov//lib/simplecov/source_file.rb#229
1996
+ def build_lines; end
1997
+
1998
+ # source://simplecov//lib/simplecov/source_file.rb#164
1999
+ def build_no_cov_chunks; end
2000
+
2001
+ # Warning to identify condition from Issue #56
2002
+ #
2003
+ # source://simplecov//lib/simplecov/source_file.rb#251
2004
+ def coverage_exceeding_source_warn; end
2005
+
2006
+ # source://simplecov//lib/simplecov/source_file.rb#214
2007
+ def ensure_remove_undefs(file_lines); end
2008
+
2009
+ # source://simplecov//lib/simplecov/source_file.rb#336
2010
+ def line_coverage_statistics; end
2011
+
2012
+ # source://simplecov//lib/simplecov/source_file.rb#246
2013
+ def lines_strength; end
2014
+
2015
+ # source://simplecov//lib/simplecov/source_file.rb#178
2016
+ def load_source; end
2017
+
2018
+ # no_cov_chunks is zero indexed to work directly with the array holding the lines
2019
+ #
2020
+ # source://simplecov//lib/simplecov/source_file.rb#160
2021
+ def no_cov_chunks; end
2022
+
2023
+ # source://simplecov//lib/simplecov/source_file.rb#282
2024
+ def process_skipped_branches(branches); end
2025
+
2026
+ # source://simplecov//lib/simplecov/source_file.rb#237
2027
+ def process_skipped_lines(lines); end
2028
+
2029
+ # source://simplecov//lib/simplecov/source_file.rb#198
2030
+ def read_lines(file, lines, current_line); end
2031
+
2032
+ # Since we are dumping to and loading from JSON, and we have arrays as keys those
2033
+ # don't make their way back to us intact e.g. just as a string
2034
+ #
2035
+ # We should probably do something different here, but as it stands these are
2036
+ # our data structures that we write so eval isn't _too_ bad.
2037
+ #
2038
+ # See #801
2039
+ #
2040
+ # source://simplecov//lib/simplecov/source_file.rb#300
2041
+ def restore_ruby_data_structure(structure); end
2042
+
2043
+ # source://simplecov//lib/simplecov/source_file.rb#206
2044
+ def set_encoding_based_on_magic_comment(file, line); end
2045
+
2046
+ # @return [Boolean]
2047
+ #
2048
+ # source://simplecov//lib/simplecov/source_file.rb#194
2049
+ def shebang?(line); end
2050
+ end
2051
+
2052
+ # Representing single branch that has been detected in coverage report.
2053
+ # Give us support methods that handle needed calculations.
2054
+ #
2055
+ # source://simplecov//lib/simplecov/source_file/branch.rb#8
2056
+ class SimpleCov::SourceFile::Branch
2057
+ # @return [Branch] a new instance of Branch
2058
+ #
2059
+ # source://simplecov//lib/simplecov/source_file/branch.rb#12
2060
+ def initialize(start_line:, end_line:, coverage:, inline:, type:); end
2061
+
2062
+ # Returns the value of attribute coverage.
2063
+ #
2064
+ # source://simplecov//lib/simplecov/source_file/branch.rb#9
2065
+ def coverage; end
2066
+
2067
+ # Return true if there is relevant count defined > 0
2068
+ #
2069
+ # @return [Boolean]
2070
+ #
2071
+ # source://simplecov//lib/simplecov/source_file/branch.rb#31
2072
+ def covered?; end
2073
+
2074
+ # Returns the value of attribute end_line.
2075
+ #
2076
+ # source://simplecov//lib/simplecov/source_file/branch.rb#9
2077
+ def end_line; end
2078
+
2079
+ # @return [Boolean]
2080
+ #
2081
+ # source://simplecov//lib/simplecov/source_file/branch.rb#22
2082
+ def inline?; end
2083
+
2084
+ # Check if branche missed or not
2085
+ #
2086
+ # @return [Boolean]
2087
+ #
2088
+ # source://simplecov//lib/simplecov/source_file/branch.rb#40
2089
+ def missed?; end
2090
+
2091
+ # @return [Boolean]
2092
+ #
2093
+ # source://simplecov//lib/simplecov/source_file/branch.rb#70
2094
+ def overlaps_with?(line_range); end
2095
+
2096
+ # Return array with coverage count and badge
2097
+ #
2098
+ # @return [Array]
2099
+ #
2100
+ # source://simplecov//lib/simplecov/source_file/branch.rb#79
2101
+ def report; end
2102
+
2103
+ # The line on which we want to report the coverage
2104
+ #
2105
+ # Usually we choose the line above the start of the branch (so that it shows up
2106
+ # at if/else) because that
2107
+ # * highlights the condition
2108
+ # * makes it distinguishable if the first line of the branch is an inline branch
2109
+ # (see the nested_branches fixture)
2110
+ #
2111
+ # source://simplecov//lib/simplecov/source_file/branch.rb#52
2112
+ def report_line; end
2113
+
2114
+ # Flags the branch as skipped
2115
+ #
2116
+ # source://simplecov//lib/simplecov/source_file/branch.rb#61
2117
+ def skipped!; end
2118
+
2119
+ # Returns true if the branch was marked skipped by virtue of nocov comments.
2120
+ #
2121
+ # @return [Boolean]
2122
+ #
2123
+ # source://simplecov//lib/simplecov/source_file/branch.rb#66
2124
+ def skipped?; end
2125
+
2126
+ # Returns the value of attribute start_line.
2127
+ #
2128
+ # source://simplecov//lib/simplecov/source_file/branch.rb#9
2129
+ def start_line; end
2130
+
2131
+ # Returns the value of attribute type.
2132
+ #
2133
+ # source://simplecov//lib/simplecov/source_file/branch.rb#9
2134
+ def type; end
2135
+ end
2136
+
2137
+ # Representation of a single line in a source file including
2138
+ # this specific line's source code, line_number and code coverage,
2139
+ # with the coverage being either nil (coverage not applicable, e.g. comment
2140
+ # line), 0 (line not covered) or >1 (the amount of times the line was
2141
+ # executed)
2142
+ #
2143
+ # source://simplecov//lib/simplecov/source_file/line.rb#10
2144
+ class SimpleCov::SourceFile::Line
2145
+ # @raise [ArgumentError]
2146
+ # @return [Line] a new instance of Line
2147
+ #
2148
+ # source://simplecov//lib/simplecov/source_file/line.rb#25
2149
+ def initialize(src, line_number, coverage); end
2150
+
2151
+ # The coverage data for this line: either nil (never), 0 (missed) or >=1 (times covered)
2152
+ #
2153
+ # source://simplecov//lib/simplecov/source_file/line.rb#16
2154
+ def coverage; end
2155
+
2156
+ # Returns true if this is a line that has been covered
2157
+ #
2158
+ # @return [Boolean]
2159
+ #
2160
+ # source://simplecov//lib/simplecov/source_file/line.rb#42
2161
+ def covered?; end
2162
+
2163
+ # The line number in the source file. Aliased as :line, :number
2164
+ #
2165
+ # source://simplecov//lib/simplecov/source_file/line.rb#14
2166
+ def line; end
2167
+
2168
+ # The line number in the source file. Aliased as :line, :number
2169
+ #
2170
+ # source://simplecov//lib/simplecov/source_file/line.rb#14
2171
+ def line_number; end
2172
+
2173
+ # Returns true if this is a line that should have been covered, but was not
2174
+ #
2175
+ # @return [Boolean]
2176
+ #
2177
+ # source://simplecov//lib/simplecov/source_file/line.rb#37
2178
+ def missed?; end
2179
+
2180
+ # Returns true if this line is not relevant for coverage
2181
+ #
2182
+ # @return [Boolean]
2183
+ #
2184
+ # source://simplecov//lib/simplecov/source_file/line.rb#47
2185
+ def never?; end
2186
+
2187
+ # The line number in the source file. Aliased as :line, :number
2188
+ #
2189
+ # source://simplecov//lib/simplecov/source_file/line.rb#14
2190
+ def number; end
2191
+
2192
+ # Whether this line was skipped
2193
+ #
2194
+ # source://simplecov//lib/simplecov/source_file/line.rb#18
2195
+ def skipped; end
2196
+
2197
+ # Flags this line as skipped
2198
+ #
2199
+ # source://simplecov//lib/simplecov/source_file/line.rb#52
2200
+ def skipped!; end
2201
+
2202
+ # Returns true if this line was skipped, false otherwise. Lines are skipped if they are wrapped with
2203
+ # # :nocov: comment lines.
2204
+ #
2205
+ # @return [Boolean]
2206
+ #
2207
+ # source://simplecov//lib/simplecov/source_file/line.rb#58
2208
+ def skipped?; end
2209
+
2210
+ # The source code for this line. Aliased as :source
2211
+ # Lets grab some fancy aliases, shall we?
2212
+ #
2213
+ # source://simplecov//lib/simplecov/source_file/line.rb#12
2214
+ def source; end
2215
+
2216
+ # The source code for this line. Aliased as :source
2217
+ #
2218
+ # source://simplecov//lib/simplecov/source_file/line.rb#12
2219
+ def src; end
2220
+
2221
+ # The status of this line - either covered, missed, skipped or never. Useful i.e. for direct use
2222
+ # as a css class in report generation
2223
+ #
2224
+ # source://simplecov//lib/simplecov/source_file/line.rb#64
2225
+ def status; end
2226
+ end
2227
+
2228
+ # source://simplecov//lib/simplecov/source_file.rb#205
2229
+ SimpleCov::SourceFile::RUBY_FILE_ENCODING_MAGIC_COMMENT_REGEX = T.let(T.unsafe(nil), Regexp)
2230
+
2231
+ # source://simplecov//lib/simplecov/source_file.rb#193
2232
+ SimpleCov::SourceFile::SHEBANG_REGEX = T.let(T.unsafe(nil), Regexp)
2233
+
2234
+ # source://simplecov//lib/simplecov/filter.rb#53
2235
+ class SimpleCov::StringFilter < ::SimpleCov::Filter
2236
+ # Returns true when the given source file's filename matches the
2237
+ # string configured when initializing this Filter with StringFilter.new('somestring')
2238
+ #
2239
+ # @return [Boolean]
2240
+ #
2241
+ # source://simplecov//lib/simplecov/filter.rb#56
2242
+ def matches?(source_file); end
2243
+ end
2244
+
2245
+ # Select the files that related to working scope directory of SimpleCov
2246
+ #
2247
+ # source://simplecov//lib/simplecov/useless_results_remover.rb#7
2248
+ module SimpleCov::UselessResultsRemover
2249
+ class << self
2250
+ # source://simplecov//lib/simplecov/useless_results_remover.rb#8
2251
+ def call(coverage_result); end
2252
+
2253
+ # source://simplecov//lib/simplecov/useless_results_remover.rb#14
2254
+ def root_regx; end
2255
+ end
2256
+ end
2257
+
2258
+ # source://simplecov//lib/simplecov/version.rb#4
2259
+ SimpleCov::VERSION = T.let(T.unsafe(nil), String)