Skip to main content

helm_schema_cli/cli/
inference_args.rs

1use clap::Args;
2
3/// API-version inference and strictness options.
4#[derive(Args, Debug, Clone)]
5pub struct InferenceArgs {
6    /// Enable Feature D apiVersion guessing for kinds whose
7    /// apiVersion the IR couldn't pin.
8    #[arg(long = "api-version-guess", conflicts_with = "strict_api_versions")]
9    pub api_version_guess: bool,
10
11    /// Disable Feature D inference entirely, regardless of
12    /// `--api-version-guess`.
13    #[arg(long = "strict-api-versions")]
14    pub strict_api_versions: bool,
15}
16
17impl InferenceArgs {
18    /// Reports whether API-version inference is enabled after strict-mode policy.
19    #[must_use]
20    pub fn enabled(&self) -> bool {
21        self.api_version_guess && !self.strict_api_versions
22    }
23}