From 301bb1d5dd55415f154271fd8c9fc520b6974c85 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 8 Dec 2017 16:44:33 +0000 Subject: [PATCH] .simplecov: filter more filters/folders. This is stuff that can never be exercised by our test suite but is exercised by `brew test-bot` so remove it from the coverage checks. --- Library/Homebrew/.simplecov | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Library/Homebrew/.simplecov b/Library/Homebrew/.simplecov index e0d6d7601a..2fa803466b 100755 --- a/Library/Homebrew/.simplecov +++ b/Library/Homebrew/.simplecov @@ -38,11 +38,22 @@ SimpleCov.start do track_files "#{SimpleCov.root}/{#{subdirs},*.rb}" end + add_filter %r{^/build.rb$} + add_filter %r{^/config.rb$} + add_filter %r{^/constants.rb$} + add_filter %r{^/postinstall.rb$} + add_filter %r{^/test.rb$} add_filter %r{^/compat/} add_filter %r{^/dev-cmd/tests.rb$} add_filter %r{^/test/} add_filter %r{^/vendor/} + require "rbconfig" + add_filter %r{^/os/mac/} unless RbConfig::CONFIG["host_os"].include?("darwin") + unless RbConfig::CONFIG["host_os"].include?("linux") + add_filter %r{^/os/linux/} + end + # Add groups and the proper project name to the output. project_name "Homebrew" add_group "Cask", %r{^/cask/}