[Feature]: Add "verify" option to xcprojformatter
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Swift
- Stelle
- 544
- Fork
- 36
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apple/xcode-project-format
-
[Bug]: xcprojformatter prints redundant/non-helpful information after a decode failureForse già presa @akhil9tiet l’ha presa 1 giorno fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
apple/xcode-project-format#27 · 1 commento ·
-
Negative encoding value crashes the decoderForse già presa @nassersala l’ha presa 60 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
[Bug]: Decoder does not restore the parent value after decoding a childForse già presa @hippi345 l’ha presa 32 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
-
question
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 35/100
apple/xcode-project-format#19 · 4 commenti · 1 reazione ·
Tutte le issue di apple/xcode-project-format
Issue simili
-
mac
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
VictorKildahl/cra#487 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Update CI ConfigAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 64/100
ashfurrow/Nimble-Snapshots#316 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
-
area: performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
manaflow-ai/cmux#44791 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
priority: p2 type: bug type: docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
googleapis/google-cloud-swift#1641 ·
I maintainer di solito rispondono entro 1 giorno