Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

"error: Could not load coverage information" on targets with 0% code coverage

オープン
#495 コメント 9 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
ruby
領域
testing, tooling

調査の方向性

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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

SlatherOrg/slather のほかの issue

SlatherOrg/slather の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。