"error: Could not load coverage information" on targets with 0% code coverage
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start with lib/slather/project.rb, especially pathnames_per_binary and profdata_coverage_files, named in the stack trace; trace how an empty coverage result is parsed when a binary has no coverage data. Reproduce with the provided multi module Slather command and inspect the SonarQube XML coverage path. Done when targets without coverage no longer trigger the reported parse error and targets with coverage still produce their report.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I am getting this error on targets that have no coverage because they have no tests and don't know if this is expected behavior or not.
error: .../DerivedData/Build/Products/Debug-iphonesimulator/SomeModule.framework/SomeModule: Failed to load coverage: No coverage data found
error: Could not load coverage information
/Users/someUser/.gems/gems/json-2.5.1/lib/json/common.rb:216:in `parse': 809: unexpected token at '' (JSON::ParserError)
from /Users/someUser/.gems/gems/json-2.5.1/lib/json/common.rb:216:in `parse'
from /Users/someUser/.gems/gems/slather-2.7.0/lib/slather/project.rb:135:in `pathnames_per_binary'
from /Users/someUser/.gems/gems/slather-2.7.0/lib/slather/project.rb:124:in `block in profdata_coverage_files'
from /Users/someUser/.gems/gems/slather-2.7.0/lib/slather/project.rb:123:in `each'
from /Users/someUser/.gems/gems/slather-2.7.0/lib/slather/project.rb:123:in `profdata_coverage_files'
from /Users/someUser/.gems/gems/slather-2.7.0/lib/slather/project.rb:98:in `coverage_files'
from /Users/someUser/.gems/gems/slather-2.7.0/lib/slather/coverage_service/sonarqube_xml_output.rb:18:in `post'
from /Users/someUser/.gems/gems/slather-2.7.0/lib/slather/command/coverage_command.rb:101:in `post'
from /Users/someUser/.gems/gems/slather-2.7.0/lib/slather/command/coverage_command.rb:61:in `execute'
from /Users/someUser/.gems/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
from /Users/someUser/.gems/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in `execute'
from /Users/someUser/.gems/gems/clamp-1.3.2/lib/clamp/command.rb:66:in `run'
from /Users/someUser/.gems/gems/clamp-1.3.2/lib/clamp/command.rb:140:in `run'
from /Users/someUser/.gems/gems/slather-2.7.0/bin/slather:17:in `<top (required)>'
from /Users/someUser/.gems/bin/slather:23:in `load'
from /Users/someUser/.gems/bin/slather:23:in `<main>'
I am trying to run slather on a multi module project, all living under one workspace. The command I am running (by using the fastlane plugin) is a more complex version of the following, where I pass all targets I want coverage on as --binary-basename parameters.
slather coverage --sonarqube-xml --build-directory DerivedData --output-directory DerivedData/slatherOutput --ignore Pods/\* --ignore Frameworks/\* --scheme MyApp-ALL-TESTS --workspace ./MyApp.xcworkspace --binary-basename MyApp --binary-basename SomeModule ./MyApp.xcodeproj
Is there a way to tell slather to ignore targets with no coverage, to avoid the error?
- Lenguaje dominante
- Ruby
- Estrellas
- 1.6k
- Forks
- 239
- Merge medio
- 10 h 19 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de SlatherOrg/slather
-
2.8.6: NoMethodError "undefined method 'first'" in profdata_coverage_dir whenever --scheme is usedPosiblemente ocupada @MirekNalepa la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
SlatherOrg/slather#586 · 4 comentarios · 4 reacciones ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
SlatherOrg/slather#582 · 1 comentario ·
-
is xcode 26 already supported?Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
SlatherOrg/slather#580 · 9 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 56/100
SlatherOrg/slather#578 · 3 comentarios · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
SlatherOrg/slather#577 ·
Todos los issues de SlatherOrg/slather
Issues similares
-
🐞 bug pending triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CircuitVerse/CircuitVerse#8031 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
riscv/riscv-unified-db#2740 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
iOS podspec depends on `React-Codegen`, which resolves to an unrelated pod on CocoaPods trunkAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
GantMan/jail-monkey#380 ·