cargo_modules/command/orphans/
options.rs

1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
5use clap::Parser;
6
7use crate::options::{GeneralOptions, ProjectOptions};
8
9#[derive(Parser, Clone, PartialEq, Eq, Debug)]
10#[group(id = "OrphansOptions")]
11pub struct Options {
12    #[command(flatten)]
13    pub general: GeneralOptions,
14
15    #[command(flatten)]
16    pub project: ProjectOptions,
17
18    /// Returns a failure code if one or more orphans are found.
19    #[arg(long = "deny")]
20    pub deny: bool,
21
22    /// Analyze with `#[cfg(test)]` enabled (i.e as if built via `cargo test`).
23    #[arg(long = "cfg-test")]
24    pub cfg_test: bool,
25}