Skip to content

add clap requires to flags that depent on --report#111

Merged
solidiquis merged 1 commit intosolidiquis:masterfrom
jhscheer:add_requires_to_report_flags
Apr 2, 2023
Merged

add clap requires to flags that depent on --report#111
solidiquis merged 1 commit intosolidiquis:masterfrom
jhscheer:add_requires_to_report_flags

Conversation

@jhscheer
Copy link
Contributor

@jhscheer jhscheer commented Apr 2, 2023

While playing around with et I was wondering why --human had no effect until I noticed that it's supposed to be used in combination with --report.
This adds the requires tag to --human and --file-name in order to print a useful error message when these options are used without --report.

A better alternative approach would be to implement something like: et --report=human,file-name, but I think that's only possible with clap's Builder API.

Copy link
Owner

@solidiquis solidiquis left a comment

Choose a reason for hiding this comment

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

Ahhh I had no idea about the requires API thanks for this!

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