release_kit/cli/profile.rs
1//! Arguments for `rk profile`.
2
3use camino::Utf8PathBuf;
4use clap::Args;
5
6use super::profile_flags::ProfileFlags;
7
8/// Report what a target resolves to, and write nothing.
9///
10/// Every profile, Git workflow, and capability value with its source, the
11/// unknown categories, the capabilities the catalog selects, and the
12/// complete destinations the projection lands.
13#[derive(Debug, Args)]
14#[expect(
15 clippy::struct_excessive_bools,
16 reason = "each field is one clap flag, and an opt-in capability's flag is a boolean by design; a state machine would hide the command line this struct describes"
17)]
18pub struct ProfileArgs {
19 /// The repository to resolve for.
20 #[arg(long, default_value = ".")]
21 pub target: Utf8PathBuf,
22
23 /// The project profile and the Git workflow, as `rk init` takes them.
24 #[command(flatten)]
25 pub profile: ProfileFlags,
26
27 /// Resolve with the Nix capability requested.
28 #[arg(long, alias = "nix")]
29 pub nix_packaging: bool,
30
31 /// Resolve with the reporting policy requested.
32 #[arg(long)]
33 pub reporting_policy: bool,
34
35 /// Resolve with the Scorecard capability requested.
36 #[arg(long)]
37 pub scorecard: bool,
38
39 /// Resolve with code scanning requested under this provider.
40 #[arg(long, value_name = "PROVIDER")]
41 pub code_scanning: Option<String>,
42
43 /// Emit one JSON object on stdout instead of the human report.
44 #[arg(long)]
45 pub json: bool,
46}