"error: Could not load coverage information" on targets with 0% code coverage
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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?
- 主要言語
- Ruby
- スター
- 1.6k
- フォーク
- 239
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SlatherOrg/slather のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
SlatherOrg/slather#582 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
SlatherOrg/slather#580 · コメント 9 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 56/100
SlatherOrg/slather#578 · コメント 3 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
SlatherOrg/slather#577 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
SlatherOrg/slather#576 · コメント 2 件 ·
SlatherOrg/slather の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
hackclub/hcb#15454 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
voxpupuli/puppet-archive#566 ·
-
area/tech debt
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 2 日以内に返信
-
verified
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 5 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
akitaonrails/ai-book-2026#10 ·