[Bug]: xcprojformatter prints redundant/non-helpful information after a decode failure
還沒有人認領這個 Issue。
評估
研究方向
可重現的情況是 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 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
apple/xcode-project-format 的其他 Issue
-
Negative encoding value crashes the decoder可能已有人在做 @nassersala 於 59 天前認領。 未關閉
難度 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 一週以上 新手友好度 20/100
-
Xcode未關閉enhancement
難度 5/5 一週以上 新手友好度 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 天內回覆
-
Crash when searching subtitles with the assrt provider (force unwrap of nil in AssrtSubtitle.swift)未關閉bug: crash feature: subtitle
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
難度 2/5 1 小時以內 新手友好度 62/100