[Bug]: xcprojformatter prints redundant/non-helpful information after a decode failure
まだ誰も着手していません。
評価
調査の方向性
再現可能なケースは xcprojformatter --update コマンドです。ツールのメインエントリポイントである Sources/ 配下で、decode エラーが捕捉され、usage/help ブロックが出力される箇所から始め、help が共有のエラーハンドリング経路によって出力されているかどうかを確認してください。再現を実行して確認します("name": "Main" 行を削除してから、--update を再実行します)。完了条件は、Missing required value for key "name" at "/targets[0]" だけが出力され、decode 失敗時には help テキストが抑制されるものの、明示的な呼び出しでは引き続き利用できることです。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
The help text doesn't help you fix the problem that the project wasn't able to be decoded, so it shouldn't print. Only Missing required value for key “name” at “/targets[0]” should print.
Steps to reproduce
$ xcrun xcodeproj init template.xcodeproj
$ xcrun xcodeproj target add Main --product-type application
...
$ xcrun xcprojformatter --update template.xcodeproj
# add a structural issue
$ sed -i '' '/^ *"name": "Main",$/d' /tmp/xc2/template.xcodeproj/project.xcproj
$ xcrun xcprojformatter --update template.xcodeproj
Missing required value for key “name” at “/targets[0]”
----------------------------
The xcprojformatter tool pretty prints 'project.xcproj' Xcode project files in their canonical format.
Usage:
xcprojformatter [[--input] input-project] [--output output-project]
...
Expected behavior
No help text.
- 主要言語
- Swift
- スター
- 544
- フォーク
- 36
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apple/xcode-project-format のほかの issue
-
Negative encoding value crashes the decoder対応中かも @nassersala が 58 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
[Bug]: Decoder does not restore the parent value after decoding a child対応中かも @hippi345 が 31 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
[Feature]:オープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
-
Xcodeオープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
[Feature]:オープンenhancement
難易度 1/5 1時間未満 初心者へのやさしさ 15/100
apple/xcode-project-format の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
OneBusAway/onebusaway-ios#1749 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 62/100