Repository navigation
chore: drop the SimpleCov code coverage setup - #94
Merged
Merged
Conversation
spec/spec_helper.rb wrapped a SimpleCov.start in an `if ENV["COVERAGE"]`
guard, but simplecov was never declared in the Gemfile or the gemspec, so
the branch could only ever fail. Running `COVERAGE=1 bundle exec rspec`
against a clean bundle aborts before a single example:
Failure/Error: require "simplecov"
LoadError: cannot load such file -- simplecov
Nothing measured the coverage it configured, no CI job set the variable,
and no threshold was enforced, so rather than add a dependency to keep an
unused switch alive this removes the block along with the /coverage/
artifact path in .gitignore.
The YARD `doc` and `doc_coverage` tasks are documentation coverage, not
code coverage, and are left alone.
Signed-off-by: Tim Smith <tim@mondoo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Removes the SimpleCov code-coverage machinery from the spec suite.
spec/spec_helper.rb: drops theif ENV["COVERAGE"]block that requiredsimplecov, defined a"gem"profile, and calledSimpleCov.start..gitignore: drops the now-unused/coverage/artifact path.Why
The coverage switch was dead code that could not run.
simplecovwas not declared anywhere — not in theGemfile, not inkitchen-vra.gemspec— so the guarded branch only ever produced aLoadErroragainst a clean bundle:That is worth calling out on its own: the suite carried a code path depending on a gem nothing declared. Nothing set
COVERAGEin CI, nominimum_coveragethreshold was enforced, and no job collected or uploaded a report — so the only two outcomes were "unset, does nothing" and "set, blows up". Rather than add a development dependency to keep an unused switch alive, this removes the switch.Documentation coverage is untouched: the YARD
docanddoc_coverageRake tasks are about undocumented methods inlib/, not code coverage, and they still run.Verification
No references remain (
grep -rin 'simplecov' .andgrep -rn 'COVERAGE' ., both excluding.git, return nothing).The YARD tasks are still listed and still run:
Example count is unchanged at 85 before and after:
Lint is clean under Cookstyle 9.0.0 / RuboCop 1.90.0:
Merge order
Branched from
mainat 05048a6 (after #92 merged), and this conflicts with neither open PR:lib/kitchen/driver/vra.rbandspec/vra_spec.rbonly — no overlap withspec/spec_helper.rbor.gitignore. Order does not matter..gitignoreand theRakefile. Its.gitignorehunk appends.kitchen/at the end of the file, twelve lines below the/coverage/line removed here, and itsRakefilechange is to the RSpec task definitions, which this PR does not touch at all. The hunks are far enough apart to merge cleanly in either order.