Functions missing from the coverage report score 0% with no warning
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- cli, testing-qa
Research direction
Start from the CLI path that handles --use-existing-coverage and the code that loads the Go coverage profile into per-function scores; the README documents the current 0% fallback. Reproduce with go test -coverprofile=target/coverage/go/coverage.out ./pkg/a then crapper --use-existing-coverage pkg/a and watch stderr. Done when files absent from the profile are counted and reported, for example crapper: 14 files are not in the coverage report; their functions score 0%, without changing the scores.
Written by the indexing model from the issue text.
Description
When a function's file is not in the coverage report, crapper scores it 0% covered and prints nothing about it. A partial report then reads as untested code.
Reproduce (Go)
- In a module with
pkg/aandpkg/a/sub, both tested, write a profile forpkg/aonly:
go test -coverprofile=target/coverage/go/coverage.out ./pkg/a - Run
crapper --use-existing-coverage pkg/a.
Every function in pkg/a/sub shows 0.0% and a high CRAP score, even though its tests pass. Nothing on stderr says those files were missing from the report. On a real repo this put a whole tested subpackage at the top of the worst-first table.
Expected
The README already documents the 0% fallback. A warning would make it visible, for example crapper: 14 files are not in the coverage report; their functions score 0%, listing the files or a count. mutator already says "a file missing from the report is treated as uncovered" during its run.
Seen at c757ec7.
- Dominant language
- Python
- Stars
- 255
- Forks
- 101
- Avg merge
- 7m
- Merged PRs (30d)
- 4
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 unclebob/crapper
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
All issues in unclebob/crapper
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
AIR-Bench Foundation reads the first letter of the word after "answer" as the model's choicePossibly taken @beartester34 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
modelscope/evalscope#2330 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Distribution plot crashes when a numeric feature is constant in the train or test setPossibly taken @adembilge claimed this today. Openbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
MAIF/shapash#847 · 1 comment ·
Maintainers usually reply within 10 days