Uh oh!
There was an error while loading. Please reload this page.
cli: deprecate VisitAll, DisableFlagsInUseLine utilities, remove HasCompletionArg - #6273
Conversation
It was only used in a single place and has no external consumers. Move it to where it's used to keep things together. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
codecov-commenter
commented
Aug 15, 2025
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
These utilities were only used internally; create a local copy where used, and deprecate the ones in cli. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
911cfbc to
5a38118CompareThere was a problem hiding this comment.
Pull Request Overview
This PR refactors the CLI utilities by deprecating and removing functions that were only used internally. The main changes include removing the HasCompletionArg utility and deprecating VisitAll and DisableFlagsInUseLine utilities while creating local copies where needed.
- Remove
HasCompletionArgutility and move implementation to where it's used - Deprecate
VisitAllandDisableFlagsInUseLineutilities with local implementations - Fix minor linting issues in cmd/docker package
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| cli/cobra.go | Deprecates VisitAll and DisableFlagsInUseLine utilities, removes HasCompletionArg |
| cli/cobra_test.go | Removes test for deprecated utilities |
| cmd/docker/docker.go | Adds local implementation of removed utilities and fixes linting issues |
| cmd/docker/docker_test.go | Adds test for local visitAll implementation |
| cli-plugins/plugin/plugin.go | Adds local implementation of visitAll utility |
| cli-plugins/plugin/plugin_test.go | Adds test for local visitAll implementation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
cli: remove HasCompletionArg utility
It was only used in a single place and has no external consumers.
Move it to where it's used to keep things together.
cli: deprecate VisitAll, DisableFlagsInUseLine utilities
These utilities were only used internally; create a local copy
where used, and deprecate the ones in cli.
cmd/docker: fix some minor linting issues
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)