class SimpleCov::Result::MissingSourceFilesReporter
different from where the resultsets were generated). See #980.
the typical cause (‘SimpleCov.collate` invoked from a machine or path
warning summarizing the drop and, when every entry was lost, point at
(100.00%)` report that looks like success but isn’t. Emit a single
filesystem they’re silently dropped — which produces an empty ‘0 / 0
When a resultset references source files that don’t exist on the local
def all_missing_warning
def all_missing_warning "SimpleCov dropped all #{@missing_paths.size} source file(s) from the result — " \ "none of the paths in the resultset exist on this filesystem: " \ "#{summary}. If you're running `SimpleCov.collate`, the source " \ "files must be available at the same absolute paths as when the individual resultsets " \ "were generated." end
def initialize(missing_paths, input_size:, every_entry_dropped:)
def initialize(missing_paths, input_size:, every_entry_dropped:) @missing_paths = missing_paths @input_size = input_size @every_entry_dropped = every_entry_dropped end
def message
def message @every_entry_dropped ? all_missing_warning : partial_missing_warning end
def partial_missing_warning
def partial_missing_warning "SimpleCov dropped #{@missing_paths.size} source file(s) from the result because " \ "they don't exist on this filesystem: #{summary}. They were " \ "tracked in the resultset but have since moved or been removed." end
def summary
def summary sample = @missing_paths.first(5).join(", ") remaining = @missing_paths.size - 5 remaining.positive? ? "#{sample} (+#{remaining} more)" : sample end
def warn!
def warn! warn SimpleCov::Color.colorize(message, :yellow) end