Skip to content

Commit

Permalink
Merge pull request #396 from raszi/fix_root_filter
Browse files Browse the repository at this point in the history
speed up root_filter
  • Loading branch information
xaviershay committed Aug 21, 2015
2 parents 6411b0b + c9dd4ca commit 76ab9c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/simplecov/defaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

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

Expand Down

0 comments on commit 76ab9c2

Please sign in to comment.