r0gue-io/pop-cli

refactor: use proper #[arg] in all the clap arguments

Open

#353 opened on Nov 27, 2024

View on GitHub
 (0 comments) (1 reaction) (0 assignees)Rust (39 forks)github user discovery
good first issuelow

Repository metrics

Stars
 (113 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

In the code, we currently use both #[arg] and #[clap] to define arguments, for example:

        #[arg(short = 'o', long = "output")]
	pub(crate) output_file: Option<PathBuf>,
	/// For production, always build in release mode to exclude debug features.
	#[clap(short = 'r', long, default_value = "true")]
	pub(crate) release: bool, 

In https://github.com/r0gue-io/pop-cli/blob/main/crates/pop-cli/src/commands/build/spec.rs#L135C2-L139C27

Review all commands and update the argument definitions to consistently use #[arg], as it aligns with the examples provided in the clap library documentation: https://github.com/clap-rs/clap

Contributor guide