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

Cobertura report shows wrong numbers

Aperta
#520 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 slather coverage -x command for Xcode projects and how it reads coverage data from the attached .xcresult bundle. Compare the line totals it uses with the 95 covered lines reported by xcrun xccov and the 88 lines in the Cobertura XML. Done means the generated report accounts for the discrepancy; the issue does not name a source file or test to start from.

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

Descrizione

I have exported the code coverage report with

coverage = JSON.parse `xcrun xccov view --report --json #{test_path}`

It gave a report with something like the below

  "coverage": {
    "coveredLines": 95,
    "lineCoverage": 1,
    "targets": [
      {

It shows that 95 lines are covered which is the actual value since I see the same number on Xcode.
Screen Shot 2022-08-10 at 11 39 44

Then I run the slather

slather coverage -x --scheme FizzBuzzKit Appcircle.xcodeproj

XML report says this

<?xml version="1.0"?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage line-rate="1.0000000000000000" branch-rate="1.0000000000000000" lines-covered="88" lines-valid="88" branches-covered="98" branches-valid="98" complexity="0.0" timestamp="1660117022" version="Slather 2.7.2">

Instead of 95, it is reporting as 88 lines.

I attached the Xcode test result as well.
FizzBuzzKit.xcresult.zip

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.