Repository navigation
fix: use SimpleCov.skip instead of the deprecated add_filter - #456
Merged
Merged
Conversation
SimpleCov 1.x deprecates add_filter in favor of skip, which takes the same arguments, and warns on every call. SimpleCov 0.22 has no skip, so pick the method SimpleCov provides.
p0deje
approved these changes
Nov 30, 2026
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.
Calls
SimpleCov.skipfor the coverage filters when SimpleCov has it, andadd_filterotherwise.SimpleCov 1.x deprecates
add_filterin favor ofskip(same arguments, same behavior) and warns when it is called.skipdoes not exist in 0.22, whichexamples/gempins, so the helper checksSimpleCov.respond_to?(:skip)instead of switching outright.Fixes #454
Tested: no automated test.
examples/gempins SimpleCov 0.22, so CI runs theadd_filterpath as before. I did not run theskippath or Ruby locally. The API difference is taken from the SimpleCov 1.x changelog andlib/simplecov/configuration/filters.rbat v1.3.2.Assisted by Claude.