File: root_filter.rb

package info (click to toggle)
ruby-simplecov 0.22.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,512 kB
  • sloc: ruby: 5,550; makefile: 10
file content (10 lines) | stat: -rw-r--r-- 283 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true

SimpleCov.profiles.define "root_filter" do
  # Exclude all files outside of simplecov root
  root_filter = nil
  add_filter do |src|
    root_filter ||= /\A#{Regexp.escape(SimpleCov.root + File::SEPARATOR)}/io
    src.filename !~ root_filter
  end
end