Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cli): Switch to clap_derive #77

Merged
merged 1 commit into from
Aug 17, 2022
Merged

Conversation

epage
Copy link
Collaborator

@epage epage commented Aug 17, 2022

This will make it easier to evolve the CLI for issues like #54

This will make it easier to evolve the CLI for issues like obi1kenobi#54
@epage epage merged commit 808a407 into obi1kenobi:main Aug 17, 2022
@epage epage deleted the derive branch August 17, 2022 17:24
Comment on lines +90 to +109
#[derive(Args)]
struct DiffFiles {
/// The current rustdoc json output to test for semver violations. Required.
#[clap(short, long = "current", value_name = "CURRENT_RUSTDOC_JSON")]
current_rustdoc_path: PathBuf,

/// The rustdoc json file to use as a semver baseline. Required.
#[clap(short, long = "baseline", value_name = "BASELINE_RUSTDOC_JSON")]
baseline_rustdoc_path: PathBuf,
}

#[derive(Args)]
struct CheckRelease {
/// The current rustdoc json output to test for semver violations. Required.
#[clap(short, long = "current", value_name = "CURRENT_RUSTDOC_JSON")]
current_rustdoc_path: PathBuf,

/// The rustdoc json file to use as a semver baseline. Required.
#[clap(short, long = "baseline", value_name = "BASELINE_RUSTDOC_JSON")]
baseline_rustdoc_path: PathBuf,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since these two subcommands are identical (though poorly documented as such), is there a way to have them use an identical struct instead of two different ones?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#78 is the follow up to this comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants