cli: deprecate VisitAll, DisableFlagsInUseLine utilities, remove HasCompletionArg#6273
Merged
thaJeztah merged 3 commits intodocker:masterfrom Aug 18, 2025
Merged
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 Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
thaJeztah
commented
Aug 15, 2025
thaJeztah
commented
Aug 15, 2025
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
5a38118
Compare
There 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.
Benehiko
approved these changes
Aug 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)