1 # frozen_string_literal: true
3 if ENV['COVERAGE'] == 'yes'
5 require 'simplecov-console'
8 SimpleCov.formatters = [
9 SimpleCov::Formatter::HTMLFormatter,
10 SimpleCov::Formatter::Console,
11 SimpleCov::Formatter::Codecov,
14 track_files 'lib/**/*.rb'
18 # do not track vendored files
22 # do not track gitignored files
23 # this adds about 4 seconds to the coverage check
24 # this could definitely be optimized
26 # system returns true if exit status is 0, which with git-check-ignore means file is ignored
27 system("git check-ignore --quiet #{f.filename}")