Skip to content

chore: remove SimpleCov code-coverage tooling - #425

Open
tas50 wants to merge 1 commit into
mainfrom
chore/remove-simplecov
Open

chore: remove SimpleCov code-coverage tooling#425
tas50 wants to merge 1 commit into
mainfrom
chore/remove-simplecov

Conversation

@tas50

@tas50 tas50 commented Aug 30, 2026

Copy link
Copy Markdown
Member

What

Removes the SimpleCov code-coverage machinery. It was opt-in (COVERAGE=1), never gated, never run in CI, and never consulted — so all it bought us was a dev dependency and an extra branch in the spec bootstrap.

Removed:

Location What went
Gemfile gem "simplecov", require: false from the :test group
spec/spec_helper.rb the if ENV["COVERAGE"] block, require "simplecov", and SimpleCov.start
Rakefile the desc "Run the unit tests with coverage reporting" / task :coverage task and its ENV["COVERAGE"] = "1"
.gitignore the coverage artifact path
CONTRIBUTING.md the rake coverage / COVERAGE=1 invocations and the "Coverage is reported but not gated" paragraph

There was no minimum_coverage / minimum_coverage_by_file enforcement, nothing under spec/support/ referenced SimpleCov, and no CI workflow uploaded or reported coverage — so nothing to remove there. The gemspec never carried the dependency either.

YARD documentation coverage is deliberately kept

The Rakefile also has desc "Report YARD documentation coverage" / task :doc_stats. That is documentation coverage, not code coverage, and it is untouched. Confirmed still present and working:

$ bundle exec rake -T | grep doc_stats
rake doc_stats              # Report YARD documentation coverage

$ bundle exec rake doc_stats
yard stats --list-undoc
Files:           5
Modules:         7 (    0 undocumented)
Classes:         8 (    0 undocumented)
Constants:       3 (    0 undocumented)
Attributes:      0 (    0 undocumented)
Methods:        51 (    0 undocumented)
 100.00% documented

Verification

Nothing left in the tree:

$ grep -rin 'simplecov' --exclude-dir=.git .
$ echo $?
1
$ grep -rn 'COVERAGE' --exclude-dir=.git .
$ echo $?
1

Test counts unchanged before and after the removal:

# before (origin/main)
595 runs, 1004 assertions, 0 failures, 0 errors, 0 skips

# after
$ bundle exec rake test
595 runs, 1004 assertions, 0 failures, 0 errors, 0 skips

Lint clean, on the same cookstyle line CI resolves (Gemfile.lock is gitignored, so CI takes the newest in ~> 9.0):

$ bundle exec cookstyle --version
Cookstyle 9.0.0
  * RuboCop 1.90.0

$ bundle exec cookstyle --chefstyle
Inspecting 21 files
.....................

21 files inspected, no offenses detected

CI on this PR has not finished at the time of writing.

Open PRs / merge order

No conflicts, and no merge order required. None of the open PRs touch Gemfile, Rakefile, or spec/spec_helper.rb:

This PR touches only Gemfile, Rakefile, spec/spec_helper.rb, .gitignore, and CONTRIBUTING.md, so it can merge in any order relative to the others.

(#424, the README docs PR, has already merged as 5a7474e.)

The opt-in coverage report was never gated, never run in CI, and never
consulted -- it only added a dev dependency and a `COVERAGE=1` branch in
the spec bootstrap that every contributor had to read past.

Removes the simplecov gem, the `SimpleCov.start` block in
spec/spec_helper.rb, the `rake coverage` task, the `coverage` artifact
path in .gitignore, and the CONTRIBUTING.md prose describing them.

The YARD documentation-coverage task (`rake doc_stats`) is unrelated and
is deliberately kept.

Signed-off-by: Tim Smith <tim@mondoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant