-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply simplecov filters #38
Conversation
Also -- I wonder if it is worth considering whether to subclass |
I agree this should be the default. I'm tempted to remove the
Sounds like a great idea to me. However I'm too busy with other projects at the moment to spend any time on it. Maybe open a new issue to keep track of it :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from coverage results by applying SimpleCov filters to the list of "tracked" files. Also ensure that Bashcov always includes files matched by SimpleCov.tracked_files in the coverage results.
by (1) making certain examples ignore uncovered files and (2) using ./spec/test_app as the Bashcov.root_directory for certain other examples
b14a921
to
deec72e
Compare
That seems 100% reasonable to me :) -- I've reworked the PR to remove the As for subclassing |
Awesome @tomeon - I gave it a quick test run and couldn't find any issues. While we're making potentially breaking changes, I'd like to wait for Ruby 2.6 to roll out before I cut the 2.0.0 release and drop support for Ruby 2.3. Let me know if you want me to push your changes to RubyGems ASAP and I'll push a prerelease in the meantime. As always, your work on Bashcov is much appreciated, thank you :) |
@infertux -- thank you very much! No rush for a pre-release; the project that I need this change for uses a |
This changeset introduces a new flag,
--prefilter
, which causes Bashcov to omit from the coverage results any files that match one or more of the filters inSimpleCov.filters
.The motivation for this feature is that SimpleCov itself will ignore these files, so Bashcov is doing work (e.g., detecting whether a file is a shell script) only for that work to be thrown away. This is especially problematic when
Bashcov.root_directory
sits at the top of a large directory hierarchy; e.g., a project that includes vendored dependencies.I've made this behavior optional, in case there are any projects in the wild that depend on Bashcov's current approach to generating the coverage results hash. However, I tend to think that this behavior should be the default. Thoughts, @infertux?