r0gue-io/pop-cli

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

Open

#353 aperta il 27 nov 2024

Vedi su GitHub
 (0 commenti) (1 reazione) (0 assegnatari)Rust (39 fork)github user discovery
good first issuelow

Metriche repository

Star
 (113 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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

Guida contributor