Skip to content

CLI: Display correct subparser name#1038

Merged
kostyanf14 merged 1 commit into
HCK-CI:masterfrom
kostyanf14:cli-name
Jul 15, 2026
Merged

CLI: Display correct subparser name#1038
kostyanf14 merged 1 commit into
HCK-CI:masterfrom
kostyanf14:cli-name

Conversation

@kostyanf14

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread lib/cli.rb
prop :testcase, T.nilable(String)

def create_parser
def create_parser(name)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

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)

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_parser to accept the subcommand name and interpolate it into the usage banner.
  • Pass explicit subcommand names when constructing the test and functest subparsers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
@kostyanf14
kostyanf14 merged commit 165e4c1 into HCK-CI:master Jul 15, 2026
6 checks passed
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.

3 participants