-
Notifications
You must be signed in to change notification settings - Fork 94
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
List Subcommand Improvements #3729
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Can we add a test (or update an existing one) to check that the json file is printed in the output?
Similarly for the markdown table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests as @zhassan-aws mentioned.
@@ -176,5 +118,42 @@ pub fn json( | |||
|
|||
serde_json::to_writer_pretty(writer, &json_obj)?; | |||
|
|||
println!("Wrote list results to {}", std::fs::canonicalize(JSON_FILENAME)?.display()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check if not quiet
Ok(()) | ||
} | ||
|
||
/// Output the results of the list subcommand. | ||
pub fn output_list_results( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Can you please move this function to the top? This is the entry point of this module, so it's easier to read the code from it.
Improvements to the list subcommand.
--format=json
(List command using--format=json
should print the location of the generated json file. #3633)CommonArgs
instead ofVerificationArgs
(List subcommand accepts redundant arguments #3632)Resolves #3632, #3633
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.