feat(cli): add --output-format option and rename --format to --input-format#95
feat(cli): add --output-format option and rename --format to --input-format#95
--output-format option and rename --format to --input-format#95Conversation
…nput-format` Add `--output-format json|text` option to `check` subcommand with `text` as the default, making output human-readable. Rename `--format` to `--input-format` for symmetry between input/output format options. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @fohte, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #95 +/- ##
==========================================
+ Coverage 89.03% 89.06% +0.03%
==========================================
Files 29 29
Lines 5880 5915 +35
==========================================
+ Hits 5235 5268 +33
- Misses 645 647 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request introduces an output format option to the runok check command, allowing users to specify whether the output should be in JSON or human-readable text format. The changes include adding an OutputFormat enum to represent the output format, modifying the CheckAdapter struct to include an output_format field, and implementing the fmt::Display trait for the CheckOutput struct to format the output as text. The CLI is updated to include an --output-format argument, and the route_check function is modified to handle the new output format option. Tests are updated to reflect the changes.
Why
runok checkalways outputs JSON, which is hard to read when run directly by humans--formatoption specifies the input format, but the name is ambiguous about whether it controls input or outputWhat
--output-format json|textoption withtextas the defaultallow,deny: reason--formatto--input-formatfor symmetry between input/output format options