Class: SimpleCov::Result::MissingSourceFilesReporter
- Inherits:
-
Object
- Object
- SimpleCov::Result::MissingSourceFilesReporter
- Defined in:
- lib/simplecov/result/missing_source_files_reporter.rb
Overview
When a resultset references source files that don’t exist on the local filesystem they’re silently dropped — which produces an empty ‘0 / 0 (100.00%)` report that looks like success but isn’t. Emit a single warning summarizing the drop and, when every entry was lost, point at the typical cause (‘SimpleCov.collate` invoked from a machine or path different from where the resultsets were generated). See #980.
Instance Method Summary collapse
-
#initialize(missing_paths, input_size:, every_entry_dropped:) ⇒ MissingSourceFilesReporter
constructor
A new instance of MissingSourceFilesReporter.
- #message ⇒ Object
- #warn! ⇒ Object
Constructor Details
#initialize(missing_paths, input_size:, every_entry_dropped:) ⇒ MissingSourceFilesReporter
Returns a new instance of MissingSourceFilesReporter.
12 13 14 15 16 |
# File 'lib/simplecov/result/missing_source_files_reporter.rb', line 12 def initialize(missing_paths, input_size:, every_entry_dropped:) @missing_paths = missing_paths @input_size = input_size @every_entry_dropped = every_entry_dropped end |
Instance Method Details
#message ⇒ Object
22 23 24 |
# File 'lib/simplecov/result/missing_source_files_reporter.rb', line 22 def @every_entry_dropped ? all_missing_warning : partial_missing_warning end |