Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Slather 2.8.5 generates Cobertura file wtih incorrect hit count for condition lines

Aperta
#582 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
ruby
Ambito
testing-qa

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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%.

Lingua principale
Ruby
Stelle
1.6k
Fork
239
Merge medio
10h 19m
PR unite (30g)
1

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SlatherOrg/slather

Tutte le issue di SlatherOrg/slather

Issue simili

Altre issue su Ruby

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.