Feature Request: Display Total Coverage Percentage in SimpleCov Index
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 48/100
Research direction
Locate the Coverage analyser and the SimpleCovIndex generator, then read how the analyser currently obtains coverage data and how the index header is assembled. Reuse the existing SimpleCov::Result covered_percent calculation so the generated index displays the overall percentage alongside the file coverage information.
Written by the indexing model from the issue text.
Description
Display total coverage percentage in SimpleCov index
Would be nice to show the overall project coverage percentage in the SimpleCov index page. Right now it only shows individual file coverage, but I often want to see the total coverage number (like "45.5%") at a glance.
I implemented this using SimpleCov's covered_percent method from the SimpleCov::Result object. The changes:
- Added a method to expose the
SimpleCov::Resultfrom theCoverageanalyser - Added
total_coverageto theSimpleCovIndexgenerator that displays it in the header - Reused the existing
Coverageanalyser logic (no duplication) - The result is cached when the analyser runs, so there's no performance impact
The implementation uses SimpleCov's own calculation method, so it's accurate and consistent with SimpleCov's reporting.
Screenshot of example working locally.
- Dominant language
- Ruby
- Stars
- 3.5k
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from whitesmith/rubycritic
-
Compare mode (-b/--mode-ci) silently succeeds when the internal checkout to the base branch fails Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
whitesmith/rubycritic#578 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
whitesmith/rubycritic#519 · 1 comment ·
-
Define LLM policy Open
Difficulty 5/5 Over a week Newbie friendliness 35/100
whitesmith/rubycritic#576 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
whitesmith/rubycritic#569 · 1 comment · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
whitesmith/rubycritic#567 · 1 reaction ·
All issues in whitesmith/rubycritic
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100