Hive
Add support to pass xcbeautify command line argument when using tuist xcodebuild
GitHub issue · Open
Why is this needed?
With the current implementation, there is no way to use tuist xcodebuild and also obtain an xml test report which would be supported out of the box by xcbeautify.
We could add a way to make accept tuist xcodebuild accept command line arguments to be forwarded to xcbeautify such as tuist xcodebuild test ... --xcbeautify-report junit --xcbeautify-junit-report-filename test.xml
Steps to address the need
Add new CLI arguments and forward them to xcbeautify
@pepicrft may I tackle this issue?
You are welcome to tackle this! 🎉
@danieleformichelli
Hi! I’m working on this task and had a few clarifying questions:
Should we only support the two arguments mentioned (--xcbeautify-report and --xcbeautify-junit-report-filename), or do we need to support all possible xcbeautify arguments?
Also, should this be limited to tuist xcodebuild test, or should we forward the arguments for all tuist xcodebuild commands?
Thanks in advance!
Hi! I’m working on this task and had a few clarifying questions:
Should we only support the two arguments mentioned (
--xcbeautify-reportand--xcbeautify-junit-report-filename), or do we need to support all possible xcbeautify arguments?Also, should this be limited to
tuist xcodebuild test, or should we forward the arguments for alltuist xcodebuildcommands?Thanks in advance!
Not sure if feasible, but I would just forward --xcbeautify-whatever value to xcbeautify as --whatever value
I think you’ll need to escape Swift Argument Parser and collect all the arguments that haven’t been parsed. Then from those you’ll have to filter the ones that start with --xcbeautify, and as @danieleformichelli said, remove that piece and pass it to the underlying xcbeautify proces.
You can use this as a reference. Note that the help here will be very important, since you need to mention the --xcbeautify convention there.