CLI: Display correct subparser name#1038
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the create_parser method in CliTestOptions to accept a name parameter, allowing the command-line usage banner to dynamically display the correct subcommand name (e.g., 'test' or 'functest'). The reviewer suggests adding a Sorbet type signature (sig) to the updated create_parser method to maintain type safety and clarity.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| prop :testcase, T.nilable(String) | ||
|
|
||
| def create_parser | ||
| def create_parser(name) |
There was a problem hiding this comment.
Since CliTestOptions extends T::Sig and the file is typed (# typed: true), it is highly recommended to define a Sorbet signature for the create_parser method to ensure type safety and clarity for its parameter and return type.
sig { params(name: String).returns(OptionParser) }
def create_parser(name)There was a problem hiding this comment.
Pull request overview
This PR fixes the CLI help/usage text for test-related subcommands by parameterizing the test option parser’s banner so it reflects the actual subcommand name (e.g., test vs functest).
Changes:
- Update
CliTestOptions#create_parserto accept the subcommand name and interpolate it into the usage banner. - Pass explicit subcommand names when constructing the
testandfunctestsubparsers.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
No description provided.