[Feature]: Add "verify" option to xcprojformatter
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 58/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Swift
- Estrelas
- 544
- Forks
- 36
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de apple/xcode-project-format
-
[Bug]: xcprojformatter prints redundant/non-helpful information after a decode failureTalvez já em andamento @akhil9tiet assumiu há 1 dia. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
apple/xcode-project-format#27 · 1 comentário ·
-
Negative encoding value crashes the decoderTalvez já em andamento @nassersala assumiu há 60 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
-
[Bug]: Decoder does not restore the parent value after decoding a childTalvez já em andamento @hippi345 assumiu há 33 dias. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
-
enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
-
question
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 35/100
apple/xcode-project-format#19 · 4 comentários · 1 reação ·
Todas as issues de apple/xcode-project-format
Issues semelhantes
-
Add a spec for skaffoldAbertagood first issue spec
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
-
mac
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 64/100
VictorKildahl/cra#487 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
521xueweihan/HelloGitHub#4390 ·
-
bug needs triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
yetanotherbrowser/yab#923 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 60/100
Ranchero-Software/NetNewsWire#5559 ·
Mantenedores costumam responder em até 11 dias