[Feature]: Add "verify" option to xcprojformatter
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 58/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Swift
- Estrellas
- 544
- Forks
- 36
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apple/xcode-project-format
-
[Bug]: xcprojformatter prints redundant/non-helpful information after a decode failurePosiblemente ocupada @akhil9tiet la tomó hace 1 día. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
apple/xcode-project-format#27 · 1 comentario ·
-
Negative encoding value crashes the decoderPosiblemente ocupada @nassersala la tomó hace 60 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
[Bug]: Decoder does not restore the parent value after decoding a childPosiblemente ocupada @hippi345 la tomó hace 33 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
question
Dificultad 1/5 Menos de una hora Aptitud para principiantes 35/100
apple/xcode-project-format#19 · 4 comentarios · 1 reacción ·
Todos los issues de apple/xcode-project-format
Issues similares
-
mac
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
VictorKildahl/cra#487 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
yetanotherbrowser/yab#923 ·
Los mantenedores suelen responder en 1 día
-
Update CI ConfigAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 64/100
ashfurrow/Nimble-Snapshots#316 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
-
area: performance
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
manaflow-ai/cmux#44791 · 1 comentario ·
Los mantenedores suelen responder en 1 día