Slather 2.8.5 generates Cobertura file wtih incorrect hit count for condition lines
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- ruby
- Domain
- testing-qa
Research direction
Start by tracing the Cobertura report generation for branch and condition coverage, then inspect how Slather reads Xcode coverage data for lines containing macros. Reproduce the reported case with the supplied command and compare the generated hit count with condition coverage on line 27. Done means the report no longer shows zero hits alongside 100% condition coverage for that case.
Written by the indexing model from the issue text.
Description
When running slather coverage -x --output-directory Coverage/ --arch arm64 --scheme MyScheme whe noticed that the Cobertura file generated by Slather had lines where the hits="0" but the condition-coverage="100%". If the condition-coverage is at 100%, it would have had to have hit that line.
If the hits="0", how can the condition-converage be 100%?
<line number="23" branch="true" hits="13" condition-coverage="100% (3/3)">
<conditions>
<condition number="0" type="jump" coverage="100%"/>
</conditions>
</line>
<line number="24" branch="false" hits="13"/>
<line number="25" branch="true" hits="13" condition-coverage="0% (0/2)">
<conditions>
<condition number="0" type="jump" coverage="0%"/>
</conditions>
</line>
<line number="26" branch="true" hits="0" condition-coverage="0% (0/2)">
<conditions>
<condition number="0" type="jump" coverage="0%"/>
</conditions>
</line>
<line number="27" branch="true" hits="0" condition-coverage="100% (1/1)"> <-------- How can hits=0 with condition-coverage 100%
<conditions>
<condition number="0" type="jump" coverage="100%"/>
</conditions>
</line>
22 | for (SomeElement *childNode in node.children) {
23 | if ([childNode.name isEqualToString:SomeThing]) {
24 | [self _doSomething:childNode];
25 | } else {
26 | SomeMacroForPrintingWithIfInIt(@"someMessage %@", childNode.name);
27 | }
28 | }
Note the problematic line is line 27 having a hit=0 with a condiiton-coverage=100%.
- Dominant language
- Ruby
- Stars
- 1.6k
- Forks
- 239
- Avg merge
- 10h 19m
- Merged PRs (30d)
- 1
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 SlatherOrg/slather
-
2.8.6: NoMethodError "undefined method 'first'" in profdata_coverage_dir whenever --scheme is usedPossibly taken @MirekNalepa claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
SlatherOrg/slather#586 · 3 comments · 4 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
SlatherOrg/slather#580 · 9 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 56/100
SlatherOrg/slather#578 · 3 comments · 1 reaction ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
SlatherOrg/slather#577 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
SlatherOrg/slather#576 · 2 comments ·
All issues in SlatherOrg/slather
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 8 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
drwl/annotaterb#406 ·
Maintainers usually reply within 2 days
-
bug: "Conversation information" accordion renders blank with 0px height when conversation has no attributesPossibly taken @gihovani claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
`hanami generate repository` would be a nice alias for `hanami generate repo`Possibly taken @sandbergja claimed this today. Openbug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
hanami/hanami-cli#455 ·