Skip to content

specify matching ssubcommand for verify and build#484

Merged
jfecher merged 2 commits intojf/unused-warning2from
mv/unused-warning2
Nov 16, 2022
Merged

specify matching ssubcommand for verify and build#484
jfecher merged 2 commits intojf/unused-warning2from
mv/unused-warning2

Conversation

@vezenovm
Copy link
Contributor

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-warnings to build cmd

Summary 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

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

Additional context

(If applicable.)

Copy link
Contributor

@jfecher jfecher left a comment

Choose a reason for hiding this comment

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

Thanks!

@jfecher jfecher merged commit d6a9834 into jf/unused-warning2 Nov 16, 2022
@jfecher jfecher deleted the mv/unused-warning2 branch November 16, 2022 15:42
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>
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