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

Move clap configuration to cli.yml #10

Closed
wants to merge 1 commit into from

Conversation

donniebishop
Copy link
Contributor

Was reading through the clap documentation and saw this feature to move the clap configuration out into a .yaml file. Cleans up main.rs a little bit, and the yaml file has a nice syntax for adding any new options or subcommands.

Recompiled arch-audit and tested that usage and behaviour of the binary seems to be unaffected by this change:

debug $ pwd
/home/dbishop/projects/arch-audit/target/debug
debug $ ./arch-audit -h
arch-audit 0.1.4

USAGE:
    arch-audit [FLAGS] [OPTIONS]

FLAGS:
    -h, --help          Prints help information
    -q, --quiet         Show only vulnerable package names and their versions
    -u, --upgradable    Show only packages that have already been fixed
    -V, --version       Prints version information

OPTIONS:
    -b, --dbpath <dbpath>    Set an alternate database location
    -f, --format <format>    Specify a format to control the output. Placeholders are %n (pkgname) and %c (CVEs)
debug $ ./arch-audit -q
libtiff
bzip2
jasper
libwmf
debug $ ./arch-audit -V
arch-audit 0.1.4

Hope this is of some help or use. Let me know if there's anything else I should do before this can be merged.

Note: Resubmitting due to fudging the first PR up

@donniebishop donniebishop deleted the cli_yaml branch November 8, 2016 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant