[Feature]: Add "verify" option to xcprojformatter
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
- 58/100
Hướng nghiên cứu
Start by reading the xcprojformatter command-line entry point and the existing --update implementation to see how it reads and formats a project file. Then check how CLI options and command tests are organized. Done means a verify option or subcommand reports success for canonical input and fails for input that formatting would change; the issue leaves the failure output format open.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the feature
Add a new option to xcprojformatter that "verifies" an .xcproj file. If the file is already in the canonical format (i.e. the file is unaffected by running xcprojformatter --update project.xcproj), the command succeeds; if the file is not in the canonical format (the file is modified by running xcprojformatter --update project.xcproj) the command fails.
This could either be a new flag, such as xcprojformatter --verify --input project.xcproj, or a new subcommand, xcprojformatter verify --input project.xcproj.
In its simplest form, a failing verification simply fails with no output. A more user-friendly version would give some sort of output to indicate what part of the file that is not in the canonical format.
Use case
Having a verify option is great in CI pipelines for Xcode projects. With it, one could enforce in PRs that the .xcproj file is not modified such that it's no longer in the canonical format. This is similar to how swift format lint can be used for source code, including Package.swift.
Alternatives considered
It is possible to do this manually, by running xcprojformatter --input <...> --output <...> and comparing the files. However, it would be natural if the cli provided this out-of-the-box.
Additional context
No response
- Ngôn ngữ chính
- Swift
- Star
- 544
- Fork
- 36
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 apple/xcode-project-format
-
[Bug]: xcprojformatter prints redundant/non-helpful information after a decode failureCó thể đã có người làm @akhil9tiet đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
apple/xcode-project-format#27 · 1 bình luận ·
-
Negative encoding value crashes the decoderCó thể đã có người làm @nassersala đã nhận 60 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
[Bug]: Decoder does not restore the parent value after decoding a childCó thể đã có người làm @hippi345 đã nhận 33 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
-
question
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
apple/xcode-project-format#19 · 4 bình luận · 1 reaction ·
Tất cả issue của apple/xcode-project-format
Issue tương tự
-
mac
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
VictorKildahl/cra#487 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
yetanotherbrowser/yab#923 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Update CI ConfigĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 64/100
ashfurrow/Nimble-Snapshots#316 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
-
area: performance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
manaflow-ai/cmux#44791 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày