[Feature]: Add "verify" option to xcprojformatter
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 58/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Swift
- Étoiles
- 544
- Forks
- 36
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apple/xcode-project-format
-
[Bug]: xcprojformatter prints redundant/non-helpful information after a decode failurePeut-être pris @akhil9tiet l’a pris il y a 1 jour. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
apple/xcode-project-format#27 · 1 commentaire ·
-
Negative encoding value crashes the decoderPeut-être pris @nassersala l’a pris il y a 60 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
-
[Bug]: Decoder does not restore the parent value after decoding a childPeut-être pris @hippi345 l’a pris il y a 32 jours. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
enhancement
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
-
question
Difficulté 1/5 Moins d'une heure Accessibilité débutants 35/100
apple/xcode-project-format#19 · 4 commentaires · 1 réaction ·
Toutes les issues de apple/xcode-project-format
Issues similaires
-
mac
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
VictorKildahl/cra#487 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Update CI ConfigOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 64/100
ashfurrow/Nimble-Snapshots#316 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
-
area: performance
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
manaflow-ai/cmux#44791 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
priority: p2 type: bug type: docs
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
googleapis/google-cloud-swift#1641 ·
Les mainteneurs répondent en général sous 1 jour