onur / cargo-license

Cargo subcommand to see license of dependencies
MIT License
418 stars 37 forks source link

Improve usage as cargo subcommand #30

Closed jonasmalacofilho closed 3 years ago

jonasmalacofilho commented 3 years ago

Drops the extra license argument received when being called with cargo license. Additionally, change the binary name displayed in the help message, for uniformity with other Cargo subcommands. Based on how cargo-fmt handles this.

$ cargo license --help
cargo-license 0.3.0
Cargo subcommand to see licenses of dependencies.

USAGE:
    cargo license [FLAGS] [OPTIONS]

FLAGS:
        --all-features     Activate all available features
    -a, --authors          Display crate authors
    -d, --do-not-bundle    Output one license per line
    -h, --help             Prints help information
    -j, --json             Detailed output as JSON
        --no-deps          Output information only about the root package and don't fetch dependencies
    -t, --tsv              Detailed output as tab-separated-values
    -V, --version          Prints version information

OPTIONS:
        --current-dir <CURRENT_DIR>    Current directory of the cargo metadata process
        --features <FEATURE>...        Space-separated list of features to activate
        --manifest-path <PATH>         Path to Cargo.toml
$ cargo-license --help
cargo-license 0.3.0
Cargo subcommand to see licenses of dependencies.

USAGE:
    cargo license [FLAGS] [OPTIONS]

FLAGS:
        --all-features     Activate all available features
    -a, --authors          Display crate authors
    -d, --do-not-bundle    Output one license per line
    -h, --help             Prints help information
    -j, --json             Detailed output as JSON
        --no-deps          Output information only about the root package and don't fetch dependencies
    -t, --tsv              Detailed output as tab-separated-values
    -V, --version          Prints version information

OPTIONS:
        --current-dir <CURRENT_DIR>    Current directory of the cargo metadata process
        --features <FEATURE>...        Space-separated list of features to activate
        --manifest-path <PATH>         Path to Cargo.toml

Closes: #23 Closes: #25 Supersedes: #27 Supersedes: #29

trivigy commented 3 years ago

@onur any chance to merge this? Should be fixing the corgo-license vs. cargo license issue I believe.

dalance commented 3 years ago

Thank you for your contribution. I took over the maintenance from @onur . I think this PR is better than other similar PRs.