diff --git a/src/bin/cargo-ziggy/coverage.rs b/src/bin/cargo-ziggy/coverage.rs index cf83db6..b344f7d 100644 --- a/src/bin/cargo-ziggy/coverage.rs +++ b/src/bin/cargo-ziggy/coverage.rs @@ -92,13 +92,18 @@ impl Cover { } }; + let output_types = match &self.output_types { + Some(o) => o, + None => "html", + }; + // We generate the code coverage report process::Command::new("grcov") .args([ ".", &format!("-b=./target/coverage/debug/{}", self.target), &format!("-s={source_or_workspace_root}"), - "-t=html", + &format!("-t={}", output_types), "--llvm", "--branch", "--ignore-not-existing", diff --git a/src/bin/cargo-ziggy/main.rs b/src/bin/cargo-ziggy/main.rs index da2ca3f..8393c0b 100644 --- a/src/bin/cargo-ziggy/main.rs +++ b/src/bin/cargo-ziggy/main.rs @@ -234,6 +234,10 @@ pub struct Cover { /// Keep coverage data files (WARNING: Do not use if source code has changed) #[clap(short, long, default_value_t = false)] keep: bool, + + /// Comma separated list of output types. See grov --help to see supported output types. + #[clap(short = 't', long)] + output_types: Option, } #[derive(Args)]