"error: Could not load coverage information" on targets with 0% code coverage
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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?
- Ngôn ngữ chính
- Ruby
- Star
- 1.6k
- Fork
- 239
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SlatherOrg/slather
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
SlatherOrg/slather#588 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
SlatherOrg/slather#582 · 1 bình luận ·
-
is xcode 26 already supported?Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
SlatherOrg/slather#580 · 9 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 56/100
SlatherOrg/slather#578 · 3 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
SlatherOrg/slather#577 ·
Tất cả issue của SlatherOrg/slather
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 62/100
TheOdinProject/curriculum#31509 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
GPX export ignores set datesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies Difficulty: Easy Good First Issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
rubyforgood/casa#7325 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100