docs(args): Clarify what args are esclusive

This commit is contained in:
Ed Page 2021-01-04 14:54:44 -06:00
parent 70163fae61
commit f27282fbc0

View file

@ -41,6 +41,7 @@ impl Default for Format {
setting = structopt::clap::AppSettings::DeriveDisplayOrder, setting = structopt::clap::AppSettings::DeriveDisplayOrder,
setting = structopt::clap::AppSettings::DontCollapseArgsInUsage setting = structopt::clap::AppSettings::DontCollapseArgsInUsage
)] )]
#[structopt(group = structopt::clap::ArgGroup::with_name("mode").multiple(false))]
pub(crate) struct Args { pub(crate) struct Args {
#[structopt(parse(from_os_str), default_value = ".")] #[structopt(parse(from_os_str), default_value = ".")]
/// Paths to check with `-` for stdin /// Paths to check with `-` for stdin
@ -54,23 +55,23 @@ pub(crate) struct Args {
/// Ignore implicit configuration files. /// Ignore implicit configuration files.
pub(crate) isolated: bool, pub(crate) isolated: bool,
#[structopt(long)] #[structopt(long, group = "mode")]
/// Print a diff of what would change /// Print a diff of what would change
pub(crate) diff: bool, pub(crate) diff: bool,
#[structopt(long, short = "w")] #[structopt(long, short = "w", group = "mode")]
/// Write fixes out /// Write fixes out
pub(crate) write_changes: bool, pub(crate) write_changes: bool,
#[structopt(long)] #[structopt(long, group = "mode")]
/// Debug: Print each file that would be spellchecked. /// Debug: Print each file that would be spellchecked.
pub(crate) files: bool, pub(crate) files: bool,
#[structopt(long)] #[structopt(long, group = "mode")]
/// Debug: Print each identifier that would be spellchecked. /// Debug: Print each identifier that would be spellchecked.
pub(crate) identifiers: bool, pub(crate) identifiers: bool,
#[structopt(long)] #[structopt(long, group = "mode")]
/// Debug: Print each word that would be spellchecked. /// Debug: Print each word that would be spellchecked.
pub(crate) words: bool, pub(crate) words: bool,