How to pass Exclude packages Array
I am able to use this xcc command as per the instructions provided in the README file.
However I am trying to provide array of packages for --exclude-packages parameter as follows,
xcc generate coverage.json TargetDirectory cobertura-xml --exclude-packages Tests AnotherPackageName --verbose
I get the following error,
Error: The value 'AnotherPackageName' is invalid for '<output-formats>'
Usage: xcc generate <json-file> <output-path> [<output-formats> ...] [--exclude-targets <exclude-targets> ...] [--exclude-packages <exclude-packages> ...] [--verbose]
The items (excluding first item) which I pass for --exclude-packages is considered for output-formats.
How to fix this?
Hi @jvigneshcs
sorry for the laaaaate answer. It is not supported for now. You will have to pass multiple --exclude-packages XXX instructions.
Perhaps we could do better with variadic arguments but I don't know if Swift Argument Parser allows that. If you have time you can take a look and make a PR, could be cool.
Thanks.
I think it does now @twittemb. Looks like it would be a pretty easy fix @jvigneshcs
https://github.com/apple/swift-argument-parser/blob/82905286cc3f0fa8adc4674bf49437cab65a8373/Sources/ArgumentParser/Parsable%20Properties/Option.swift#L254