Skip to content

[CLI] Use Swift Argument Parser#296

Merged
tylervick merged 1 commit intoXCTestHTMLReport:mainfrom
tylervick:tvick/swift-argument-parser
Dec 7, 2022
Merged

[CLI] Use Swift Argument Parser#296
tylervick merged 1 commit intoXCTestHTMLReport:mainfrom
tylervick:tvick/swift-argument-parser

Conversation

@tylervick
Copy link
Copy Markdown
Member

https://github.com/apple/swift-argument-parser is a more standardized way to organize arguments, options, and flags. XCTestHTMLReport's current implementation is outdated and does not conform to some POSIX standards like exit codes, help text, etc.

This is a potentially breaking change. We will ensure existing args/flags/etc. remain backwards compatible, but there is still the chance for unexpected behavior to occur.

A notable example is the usage of stdout and stderr. The current implementation outputs everything through stdout whereas Swift Argument Parser may use stderr for error messages and non-zero exit codes.

Overview of command changes:

  • In addition to the -r flag, xcresult paths are now specified via positional args
  • In addition to the -i flag, the rendering mode may be specified via --rendering-mode options (inline or linking)
  • -o or --output may be used to specify the output directory, defaults to the xcresult location
  • Most flags now support long names in addition to their abbreviated versions, e.g. -j or --junit-enabled

@tylervick tylervick merged commit dfdb135 into XCTestHTMLReport:main Dec 7, 2022
@tylervick tylervick deleted the tvick/swift-argument-parser branch December 7, 2022 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant