specify matching ssubcommand for verify and build#484
Merged
jfecher merged 2 commits intojf/unused-warning2from Nov 16, 2022
Merged
specify matching ssubcommand for verify and build#484jfecher merged 2 commits intojf/unused-warning2from
jfecher merged 2 commits intojf/unused-warning2from
Conversation
jfecher
pushed a commit
that referenced
this pull request
Nov 17, 2022
* Add unused warning * Add allow-warnings flag * Update args * Add argument to test * specify matching ssubcommand for verify and build (#484) * specify matching ssubcommand for verify and build * cargo fmt * removed unnecessary dbg!(args) Co-authored-by: Maxim Vezenov <mvezenov@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue(s)
(If it does not already exist, first create a GitHub issue that describes the problem this Pull Request (PR) solves before creating the PR and link it here.)
Resolves #263
Description
Fixes verify cmd and adds
allow-warningsto build cmdSummary of changes
It seems that fetching args using our CLI crate now requires specifying the subcommand being matched before fetching any args for that subcommands.
let args = args.subcommand_matches("build").unwrap();Only then can you do
let allow_warnings = args.is_present("allow-warnings");Dependency additions / changes
(If applicable.)
Test additions / changes
(If applicable.)
Checklist
cargo fmtwith default settings.Additional context
(If applicable.)