Skip to content

update golangci-lint to v1.52.2#4134

Merged
thaJeztah merged 34 commits intodocker:masterfrom
thaJeztah:update_golangci_lint
Mar 30, 2023
Merged

update golangci-lint to v1.52.2#4134
thaJeztah merged 34 commits intodocker:masterfrom
thaJeztah:update_golangci_lint

Conversation

@thaJeztah
Copy link
Member

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@codecov-commenter
Copy link

codecov-commenter commented Mar 29, 2023

Codecov Report

Merging #4134 (d490397) into master (fc6703b) will decrease coverage by 0.02%.
The diff coverage is 61.11%.

❗ Current head d490397 differs from pull request most recent head e40044c. Consider uploading reports for the commit e40044c to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4134      +/-   ##
==========================================
- Coverage   59.16%   59.14%   -0.02%     
==========================================
  Files         287      287              
  Lines       24716    24713       -3     
==========================================
- Hits        14623    14617       -6     
- Misses       9209     9213       +4     
+ Partials      884      883       -1     

@thaJeztah thaJeztah force-pushed the update_golangci_lint branch from 6d17602 to 2a1df2c Compare March 29, 2023 11:53
@thaJeztah thaJeztah marked this pull request as draft March 29, 2023 11:54
@thaJeztah thaJeztah force-pushed the update_golangci_lint branch 4 times, most recently from d6ded5d to d490397 Compare March 29, 2023 20:34
Comment on lines 26 to 20
// NetworkDisconnect fakes disconnecting from a network
func (c *FakeClient) NetworkDisconnect(ctx context.Context, networkID, container string, force bool) error {
return nil
}
// // NetworkConnect fakes connecting to a network
// func (c *FakeClient) NetworkConnect(context.Context, string, string, *network.EndpointSettings) error {
// return nil
// }
//
Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like these "fakes" don't need all these "unimplemented" methods; instead of changing all the unused arguments, we may be able to remove the stubs and just embed the interface

@thaJeztah thaJeztah force-pushed the update_golangci_lint branch 2 times, most recently from e40044c to 1930455 Compare March 30, 2023 15:03
…e (revive)

    cli/command/container/run.go:176:3: redefines-builtin-id: redefinition of the built-in function close (revive)
            close, err := attachContainer(ctx, dockerCli, &errCh, config, createResponse.ID)
            ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/context/create.go:121:2: if-return: redundant if ...; err != nil check, just return error instead. (revive)
        if err := s.ResetTLSMaterial(o.Name, &contextTLSData); err != nil {
            return err
        }

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
These wrappers were added to abstract stack deploy to k8s and swarm. Now
that support for deploying to k8s was removed, we can remove these wrappers.

This deprecates:

- RunDeploy()
- RunPs()
- RunRemove()
- GetServices()

This also addresses some linting failers, due to these functions having
unused arguments:

    cli/command/stack/deploy.go:51:39: unused-parameter: parameter 'flags' seems to be unused, consider removing or renaming it as _ (revive)
    func RunDeploy(dockerCli command.Cli, flags *pflag.FlagSet, config *composetypes.Config, opts options.Deploy) error {
                                              ^
    cli/command/stack/ps.go:42:35: unused-parameter: parameter 'flags' seems to be unused, consider removing or renaming it as _ (revive)
    func RunPs(dockerCli command.Cli, flags *pflag.FlagSet, opts options.PS) error {
                                      ^
    cli/command/stack/remove.go:35:39: unused-parameter: parameter 'flags' seems to be unused, consider removing or renaming it as _ (revive)
    func RunRemove(dockerCli command.Cli, flags *pflag.FlagSet, opts options.Remove) error {
                                          ^
    cli/command/stack/list.go:37:14: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
    func RunList(cmd *cobra.Command, dockerCli command.Cli, opts options.List) error {
                 ^
    cli/command/stack/services.go:56:41: unused-parameter: parameter 'flags' seems to be unused, consider removing or renaming it as _ (revive)
    func GetServices(dockerCli command.Cli, flags *pflag.FlagSet, opts options.Services) ([]swarmtypes.Service, error) {
                                            ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/completion/functions.go:97:17: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
    func NoComplete(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
                    ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
These functions must have the same signature, but only some of them accept
an "all" boolean argument;
https://github.com/docker/cli/blob/88924b180210be1b6b82a7ad1ac6732606ff270f/cli/command/system/prune.go#L79

    cli/command/container/prune.go:78:38: unused-parameter: parameter 'all' seems to be unused, consider removing or renaming it as _ (revive)
    func RunPrune(dockerCli command.Cli, all bool, filter opts.FilterOpt) (uint64, string, error) {
                                         ^
    cli/command/network/prune.go:73:38: unused-parameter: parameter 'all' seems to be unused, consider removing or renaming it as _ (revive)
    func RunPrune(dockerCli command.Cli, all bool, filter opts.FilterOpt) (uint64, string, error) {
                                         ^
    cli/command/volume/prune.go:78:38: unused-parameter: parameter 'all' seems to be unused, consider removing or renaming it as _ (revive)
    func RunPrune(dockerCli command.Cli, all bool, filter opts.FilterOpt) (uint64, string, error) {
                                         ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This function must match the interface, but doesn't use the firs argument.

    cli/command/service/progress/progress.go:417:40: unused-parameter: parameter 'service' seems to be unused, consider removing or renaming it as _ (revive)
    func (u *globalProgressUpdater) update(service swarm.Service, tasks []swarm.Task, activeNodes map[string]struct{}, rollback bool) (bool, error) {
                                           ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…revive)

This method implements the interface defined in distribution, but doesn't
use the argument.

    cli/registry/client/endpoint.go:123:69: unused-parameter: parameter 'params' seems to be unused, consider removing or renaming it as _ (revive)
    func (th *existingTokenHandler) AuthorizeRequest(req *http.Request, params map[string]string) error {
                                                                        ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…n (revive)

    opts/capabilities.go:25:2: redefines-builtin-id: redefinition of the built-in function cap (revive)
        cap = strings.ToUpper(strings.TrimSpace(cap))
        ^
    opts/capabilities.go:30:3: redefines-builtin-id: redefinition of the built-in function cap (revive)
            cap = "CAP_" + cap
            ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
These method must implements an interface, but don't use the argument.

    cli/trust/trust.go:85:40: unused-parameter: parameter 'u' seems to be unused, consider removing or renaming it as _ (revive)
    func (scs simpleCredentialStore) Basic(u *url.URL) (string, string) {
                                           ^
    cli/trust/trust.go:89:47: unused-parameter: parameter 'u' seems to be unused, consider removing or renaming it as _ (revive)
    func (scs simpleCredentialStore) RefreshToken(u *url.URL, service string) string {
                                                  ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…ating

Only a single method of the FakeClient was actually implemented (and used).
This patch embeds the interface it must implement to reduce the boilerplating
for not yet implemented methods.

Calling any of the unimplemented methods will result in a panic, which will
make it clear when they must be implemented :)

This also fixes various linting errors;

    internal/test/network/client.go:17:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *FakeClient) NetworkConnect(ctx context.Context, networkID, container string, config *network.EndpointSettings) error {
                                        ^
    internal/test/network/client.go:22:65: unused-parameter: parameter 'options' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *FakeClient) NetworkCreate(_ context.Context, _ string, options types.NetworkCreate) (types.NetworkCreateResponse, error) {
                                                                    ^
    internal/test/network/client.go:27:40: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *FakeClient) NetworkDisconnect(ctx context.Context, networkID, container string, force bool) error {
                                           ^
    internal/test/network/client.go:45:53: unused-parameter: parameter 'options' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *FakeClient) NetworkList(_ context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) {
                                                        ^
    internal/test/network/client.go:50:36: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *FakeClient) NetworkRemove(ctx context.Context, networkID string) error {
                                       ^
    internal/test/network/client.go:55:55: unused-parameter: parameter 'pruneFilter' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *FakeClient) NetworksPrune(_ context.Context, pruneFilter filters.Args) (types.NetworksPruneReport, error) {
                                                          ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
I could either remove the name for these contexts, or make the fake functions
more accurately reflect the actual implementation (decided to go for the latter
one)

.   cli/command/config/client_test.go:19:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) ConfigCreate(ctx context.Context, spec swarm.ConfigSpec) (types.ConfigCreateResponse, error) {
                                      ^
    cli/command/config/client_test.go:26:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) ConfigInspectWithRaw(ctx context.Context, id string) (swarm.Config, []byte, error) {
                                              ^
    cli/command/config/client_test.go:33:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error) {
                                    ^
    cli/command/config/client_test.go:40:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) ConfigRemove(ctx context.Context, name string) error {
                                      ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the update_golangci_lint branch 2 times, most recently from a61df36 to 18c3b4d Compare March 30, 2023 15:15
@thaJeztah thaJeztah mentioned this pull request Mar 30, 2023
    cli/command/image/build/context_test.go:21:19: unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
    func prepareEmpty(t *testing.T) string {
                      ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/image/client_test.go:90:34: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error) {
                                     ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/network/client_test.go:55:44: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) NetworkInspectWithRaw(ctx context.Context, network string, options types.NetworkInspectOptions) (types.NetworkResource, []byte, error) {
                                               ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/node/client_test.go:23:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeInspectWithRaw(ctx context.Context, ref string) (swarm.Node, []byte, error) {
                                              ^
    cli/command/node/client_test.go:30:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) {
                                    ^
    cli/command/node/client_test.go:37:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error {
                                      ^
    cli/command/node/client_test.go:44:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error {
                                      ^
    cli/command/node/client_test.go:51:29: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) Info(ctx context.Context) (types.Info, error) {
                                ^
    cli/command/node/client_test.go:58:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) {
                                              ^
    cli/command/node/client_test.go:65:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) {
                                    ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/plugin/client_test.go:23:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) PluginCreate(ctx context.Context, createContext io.Reader, createOptions types.PluginCreateOptions) error {
                                      ^
    cli/command/plugin/client_test.go:30:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) PluginEnable(ctx context.Context, name string, enableOptions types.PluginEnableOptions) error {
                                      ^
    cli/command/plugin/client_test.go:37:36: unused-parameter: parameter 'context' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) PluginDisable(context context.Context, name string, disableOptions types.PluginDisableOptions) error {
                                       ^
    cli/command/plugin/client_test.go:44:35: unused-parameter: parameter 'context' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) PluginRemove(context context.Context, name string, removeOptions types.PluginRemoveOptions) error {
                                      ^
    cli/command/plugin/client_test.go:51:36: unused-parameter: parameter 'context' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) PluginInstall(context context.Context, name string, installOptions types.PluginInstallOptions) (io.ReadCloser, error) {
                                       ^
    cli/command/plugin/client_test.go:58:33: unused-parameter: parameter 'context' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) PluginList(context context.Context, filter filters.Args) (types.PluginsListResponse, error) {
                                    ^
    cli/command/plugin/client_test.go:66:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error) {
                                              ^
    cli/command/plugin/client_test.go:74:27: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) Info(ctx context.Context) (types.Info, error) {
                              ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/registry/login_test.go:37:26: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c fakeClient) Info(ctx context.Context) (types.Info, error) {
                             ^
    cli/command/registry/login_test.go:41:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c fakeClient) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registrytypes.AuthenticateOKBody, error) {
                                      ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/service/update_test.go:507:41: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (s secretAPIClientMock) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error) {
                                            ^
    cli/command/service/update_test.go:511:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (s secretAPIClientMock) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error) {
                                              ^
    cli/command/service/update_test.go:515:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (s secretAPIClientMock) SecretRemove(ctx context.Context, id string) error {
                                              ^
    cli/command/service/update_test.go:519:51: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (s secretAPIClientMock) SecretInspectWithRaw(ctx context.Context, name string) (swarm.Secret, []byte, error) {
                                                      ^
    cli/command/service/update_test.go:523:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (s secretAPIClientMock) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error {
                                              ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/stack/swarm/client_test.go:46:38: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServerVersion(ctx context.Context) (types.Version, error) {
                                         ^
    cli/command/stack/swarm/client_test.go:57:36: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) {
                                       ^
    cli/command/stack/swarm/client_test.go:72:36: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) {
                                       ^
    cli/command/stack/swarm/client_test.go:87:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error) {
                                      ^
    cli/command/stack/swarm/client_test.go:102:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error) {
                                      ^
    cli/command/stack/swarm/client_test.go:117:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) {
                                    ^
    cli/command/stack/swarm/client_test.go:124:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) {
                                    ^
    cli/command/stack/swarm/client_test.go:131:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeInspectWithRaw(ctx context.Context, ref string) (swarm.Node, []byte, error) {
                                              ^
    cli/command/stack/swarm/client_test.go:138:38: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error) {
                                         ^
    cli/command/stack/swarm/client_test.go:146:38: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServiceRemove(ctx context.Context, serviceID string) error {
                                         ^
    cli/command/stack/swarm/client_test.go:155:38: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NetworkRemove(ctx context.Context, networkID string) error {
                                         ^
    cli/command/stack/swarm/client_test.go:164:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) SecretRemove(ctx context.Context, secretID string) error {
                                        ^
    cli/command/stack/swarm/client_test.go:173:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ConfigRemove(ctx context.Context, configID string) error {
                                        ^
    cli/command/stack/client_test.go:46:38: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServerVersion(ctx context.Context) (types.Version, error) {
                                         ^
    cli/command/stack/client_test.go:57:36: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) {
                                       ^
    cli/command/stack/client_test.go:72:36: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) {
                                       ^
    cli/command/stack/client_test.go:87:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error) {
                                      ^
    cli/command/stack/client_test.go:102:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error) {
                                      ^
    cli/command/stack/client_test.go:117:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) {
                                    ^
    cli/command/stack/client_test.go:124:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) {
                                    ^
    cli/command/stack/client_test.go:131:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeInspectWithRaw(ctx context.Context, ref string) (swarm.Node, []byte, error) {
                                              ^
    cli/command/stack/client_test.go:138:38: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error) {
                                         ^
    cli/command/stack/client_test.go:146:38: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServiceRemove(ctx context.Context, serviceID string) error {
                                         ^
    cli/command/stack/client_test.go:155:38: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NetworkRemove(ctx context.Context, networkID string) error {
                                         ^
    cli/command/stack/client_test.go:164:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) SecretRemove(ctx context.Context, secretID string) error {
                                        ^
    cli/command/stack/client_test.go:173:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ConfigRemove(ctx context.Context, configID string) error {
                                        ^
    cli/command/stack/client_test.go:182:46: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServiceInspectWithRaw(ctx context.Context, serviceID string, opts types.ServiceInspectOptions) (swarm.Service, []byte, error) {
                                                 ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/swarm/ipnet_slice_test.go:13:14: unused-parameter: parameter 'ip' seems to be unused, consider removing or renaming it as _ (revive)
    func getCIDR(ip net.IP, cidr *net.IPNet, err error) net.IPNet {
                 ^
    cli/command/swarm/client_test.go:24:29: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) Info(ctx context.Context) (types.Info, error) {
                                ^
    cli/command/swarm/client_test.go:31:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeInspectWithRaw(ctx context.Context, ref string) (swarm.Node, []byte, error) {
                                              ^
    cli/command/swarm/client_test.go:38:34: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) {
                                     ^
    cli/command/swarm/client_test.go:45:37: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) SwarmInspect(ctx context.Context) (swarm.Swarm, error) {
                                        ^
    cli/command/swarm/client_test.go:52:42: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) SwarmGetUnlockKey(ctx context.Context) (types.SwarmUnlockKeyResponse, error) {
                                             ^
    cli/command/swarm/client_test.go:59:34: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error {
                                     ^
    cli/command/swarm/client_test.go:66:35: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) SwarmLeave(ctx context.Context, force bool) error {
                                      ^
    cli/command/swarm/client_test.go:73:36: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error {
                                       ^
    cli/command/swarm/client_test.go:80:36: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error {
                                       ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/task/client_test.go:17:43: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) NodeInspectWithRaw(ctx context.Context, ref string) (swarm.Node, []byte, error) {
                                              ^
    cli/command/task/client_test.go:24:46: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (cli *fakeClient) ServiceInspectWithRaw(ctx context.Context, ref string, options types.ServiceInspectOptions) (swarm.Service, []byte, error) {
                                                 ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/trust/inspect_pretty_test.go:30:27: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) Info(ctx context.Context) (types.Info, error) {
                              ^
    cli/command/trust/inspect_pretty_test.go:34:42: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) ImageInspectWithRaw(ctx context.Context, imageID string) (types.ImageInspect, []byte, error) {
                                             ^
    cli/command/trust/inspect_pretty_test.go:38:32: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) ImagePush(ctx context.Context, image string, options types.ImagePushOptions) (io.ReadCloser, error) {
                                   ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/command/volume/prune_test.go:113:22: unused-parameter: parameter 'args' seems to be unused, consider removing or renaming it as _ (revive)
    func simplePruneFunc(args filters.Args) (types.VolumesPruneReport, error) {
                         ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/compose/convert/service_test.go:599:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error) {
                                    ^
    cli/compose/convert/service_test.go:606:33: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *fakeClient) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error) {
                                    ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/compose/schema/schema.go:20:44: unused-parameter: parameter 'input' seems to be unused, consider removing or renaming it as _ (revive)
    func (checker portsFormatChecker) IsFormat(input interface{}) bool {
                                               ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
…evive)

    cli/config/configfile/file_test.go:189:33: unused-parameter: parameter 'authConfig' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *mockNativeStore) Store(authConfig types.AuthConfig) error {
                                    ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    cli/connhelper/commandconn/commandconn.go:35:10: unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
    func New(ctx context.Context, cmd string, args ...string) (net.Conn, error) {
             ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    internal/test/notary/client.go:16:33: unused-parameter: parameter 'imgRefAndAuth' seems to be unused, consider removing or renaming it as _ (revive)
    func GetOfflineNotaryRepository(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (client.Repository, error) {
                                    ^
    internal/test/notary/client.go:25:45: unused-parameter: parameter 'rootKeyIDs' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) Initialize(rootKeyIDs []string, serverManagedRoles ...data.RoleName) error {
                                                ^
    internal/test/notary/client.go:30:60: unused-parameter: parameter 'rootKeyIDs' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) InitializeWithCertificate(rootKeyIDs []string, rootCerts []data.PublicKey, serverManagedRoles ...data.RoleName) error {
                                                               ^
    internal/test/notary/client.go:42:44: unused-parameter: parameter 'target' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) AddTarget(target *client.Target, roles ...data.RoleName) error {
                                               ^
    internal/test/notary/client.go:48:47: unused-parameter: parameter 'targetName' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) RemoveTarget(targetName string, roles ...data.RoleName) error {
                                                  ^
    internal/test/notary/client.go:54:46: unused-parameter: parameter 'roles' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error) {
                                                 ^
    internal/test/notary/client.go:59:50: unused-parameter: parameter 'name' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error) {
                                                     ^
    internal/test/notary/client.go:65:61: unused-parameter: parameter 'name' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error) {
                                                                ^
    internal/test/notary/client.go:85:48: unused-parameter: parameter 'name' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) AddDelegation(name data.RoleName, delegationKeys []data.PublicKey, paths []string) error {
                                                   ^
    internal/test/notary/client.go:90:59: unused-parameter: parameter 'name' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) AddDelegationRoleAndKeys(name data.RoleName, delegationKeys []data.PublicKey) error {
                                                              ^
    internal/test/notary/client.go:95:53: unused-parameter: parameter 'name' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) AddDelegationPaths(name data.RoleName, paths []string) error {
                                                        ^
    internal/test/notary/client.go:100:63: unused-parameter: parameter 'name' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) RemoveDelegationKeysAndPaths(name data.RoleName, keyIDs, paths []string) error {
                                                                  ^
    internal/test/notary/client.go:105:55: unused-parameter: parameter 'name' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) RemoveDelegationRole(name data.RoleName) error {
                                                          ^
    internal/test/notary/client.go:110:56: unused-parameter: parameter 'name' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) RemoveDelegationPaths(name data.RoleName, paths []string) error {
                                                           ^
    internal/test/notary/client.go:115:55: unused-parameter: parameter 'name' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) RemoveDelegationKeys(name data.RoleName, keyIDs []string) error {
                                                          ^
    internal/test/notary/client.go:120:55: unused-parameter: parameter 'name' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) ClearDelegationPaths(name data.RoleName) error {
                                                          ^
    internal/test/notary/client.go:126:42: unused-parameter: parameter 'roles' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) Witness(roles ...data.RoleName) ([]data.RoleName, error) {
                                             ^
    internal/test/notary/client.go:131:44: unused-parameter: parameter 'role' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) RotateKey(role data.RoleName, serverManagesKey bool, keyList []string) error {
                                               ^
    internal/test/notary/client.go:142:52: unused-parameter: parameter 'version' seems to be unused, consider removing or renaming it as _ (revive)
    func (o OfflineNotaryRepository) SetLegacyVersions(version int) {}
                                                       ^
    internal/test/notary/client.go:150:39: unused-parameter: parameter 'imgRefAndAuth' seems to be unused, consider removing or renaming it as _ (revive)
    func GetUninitializedNotaryRepository(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (client.Repository, error) {
                                          ^
    internal/test/notary/client.go:163:51: unused-parameter: parameter 'rootKeyIDs' seems to be unused, consider removing or renaming it as _ (revive)
    func (u UninitializedNotaryRepository) Initialize(rootKeyIDs []string, serverManagedRoles ...data.RoleName) error {
                                                      ^
    internal/test/notary/client.go:168:66: unused-parameter: parameter 'rootKeyIDs' seems to be unused, consider removing or renaming it as _ (revive)
    func (u UninitializedNotaryRepository) InitializeWithCertificate(rootKeyIDs []string, rootCerts []data.PublicKey, serverManagedRoles ...data.RoleName) error {
                                                                     ^
    internal/test/notary/client.go:180:52: unused-parameter: parameter 'roles' seems to be unused, consider removing or renaming it as _ (revive)
    func (u UninitializedNotaryRepository) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error) {
                                                       ^
    internal/test/notary/client.go:185:56: unused-parameter: parameter 'name' seems to be unused, consider removing or renaming it as _ (revive)
    func (u UninitializedNotaryRepository) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error) {
                                                           ^
    internal/test/notary/client.go:191:67: unused-parameter: parameter 'name' seems to be unused, consider removing or renaming it as _ (revive)
    func (u UninitializedNotaryRepository) GetAllTargetMetadataByName(name string) ([]client.TargetSignedStruct, error) {
                                                                      ^
    internal/test/notary/client.go:206:50: unused-parameter: parameter 'role' seems to be unused, consider removing or renaming it as _ (revive)
    func (u UninitializedNotaryRepository) RotateKey(role data.RoleName, serverManagesKey bool, keyList []string) error {
                                                     ^
    internal/test/notary/client.go:211:38: unused-parameter: parameter 'imgRefAndAuth' seems to be unused, consider removing or renaming it as _ (revive)
    func GetEmptyTargetsNotaryRepository(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (client.Repository, error) {
                                         ^
    internal/test/notary/client.go:223:50: unused-parameter: parameter 'rootKeyIDs' seems to be unused, consider removing or renaming it as _ (revive)
    func (e EmptyTargetsNotaryRepository) Initialize(rootKeyIDs []string, serverManagedRoles ...data.RoleName) error {
                                                     ^
    internal/test/notary/client.go:228:65: unused-parameter: parameter 'rootKeyIDs' seems to be unused, consider removing or renaming it as _ (revive)
    func (e EmptyTargetsNotaryRepository) InitializeWithCertificate(rootKeyIDs []string, rootCerts []data.PublicKey, serverManagedRoles ...data.RoleName) error {
                                                                    ^
    internal/test/notary/client.go:240:51: unused-parameter: parameter 'roles' seems to be unused, consider removing or renaming it as _ (revive)
    func (e EmptyTargetsNotaryRepository) ListTargets(roles ...data.RoleName) ([]*client.TargetWithRole, error) {
                                                      ^
    internal/test/notary/client.go:245:68: unused-parameter: parameter 'roles' seems to be unused, consider removing or renaming it as _ (revive)
    func (e EmptyTargetsNotaryRepository) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error) {
                                                                       ^
    internal/test/notary/client.go:284:49: unused-parameter: parameter 'role' seems to be unused, consider removing or renaming it as _ (revive)
    func (e EmptyTargetsNotaryRepository) RotateKey(role data.RoleName, serverManagesKey bool, keyList []string) error {
                                                    ^
    internal/test/notary/client.go:289:32: unused-parameter: parameter 'imgRefAndAuth' seems to be unused, consider removing or renaming it as _ (revive)
    func GetLoadedNotaryRepository(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (client.Repository, error) {
                                   ^
    internal/test/notary/client.go:509:45: unused-parameter: parameter 'imgRefAndAuth' seems to be unused, consider removing or renaming it as _ (revive)
    func GetLoadedWithNoSignersNotaryRepository(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (client.Repository, error) {
                                                ^
    internal/test/notary/client.go:532:75: unused-parameter: parameter 'roles' seems to be unused, consider removing or renaming it as _ (revive)
    func (l LoadedWithNoSignersNotaryRepository) GetTargetByName(name string, roles ...data.RoleName) (*client.TargetWithRole, error) {
                                                                              ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    internal/test/cli.go:184:34: unused-parameter: parameter 'insecure' seems to be unused, consider removing or renaming it as _ (revive)
    func (c *FakeCli) RegistryClient(insecure bool) registryclient.RegistryClient {
                                     ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the update_golangci_lint branch from 18c3b4d to b8747b0 Compare March 30, 2023 15:22
@thaJeztah
Copy link
Member Author

thaJeztah commented Mar 30, 2023

Not sure what went wrong here; this part looks suspicious (but maybe it's part of the test 🤔);

2023-03-30T15:25:53.7043027Z         Invalid Plugins:
2023-03-30T15:25:53.7043595Z           badmeta            invalid metadata: invalid character 'i' looking for beginning of object key string
Details
2023-03-30T15:25:53.6911048Z === FAIL: e2e/cli-plugins TestBadHelp (0.11s)
2023-03-30T15:25:53.6911359Z     run_test.go:110: assertion failed: 
2023-03-30T15:25:53.6911821Z         Command:  docker --config /tmp/plugin-test-1119030114 badmeta -h
2023-03-30T15:25:53.6912144Z         ExitCode: 0
2023-03-30T15:25:53.6923216Z         Stdout:   Flag shorthand -h has been deprecated, please use --help
2023-03-30T15:25:53.6923570Z         
2023-03-30T15:25:53.6923798Z         Usage:  docker [OPTIONS] COMMAND
2023-03-30T15:25:53.6924005Z         
2023-03-30T15:25:53.6924396Z         A self-sufficient runtime for containers
2023-03-30T15:25:53.6924632Z         
2023-03-30T15:25:53.6924815Z         Common Commands:
2023-03-30T15:25:53.6925093Z           run                Create and run a new container from an image
2023-03-30T15:25:53.6925429Z           exec               Execute a command in a running container
2023-03-30T15:25:53.6925711Z           ps                 List containers
2023-03-30T15:25:53.6925970Z           build              Build an image from a Dockerfile
2023-03-30T15:25:53.6926600Z           pull               Download an image from a registry
2023-03-30T15:25:53.6926900Z           push               Upload an image to a registry
2023-03-30T15:25:53.6927143Z           images             List images
2023-03-30T15:25:53.6927394Z           login              Log in to a registry
2023-03-30T15:25:53.6927656Z           logout             Log out from a registry
2023-03-30T15:25:53.6927918Z           search             Search Docker Hub for images
2023-03-30T15:25:53.6928214Z           version            Show the Docker version information
2023-03-30T15:25:53.6928617Z           info               Display system-wide information
2023-03-30T15:25:53.6929009Z         
2023-03-30T15:25:53.6929217Z         Management Commands:
2023-03-30T15:25:53.6929455Z           builder            Manage builds
2023-03-30T15:25:53.6929735Z           buildx*            Docker Buildx (Docker Inc., v0.10.4)
2023-03-30T15:25:53.6930004Z           container          Manage containers
2023-03-30T15:25:53.6930266Z           context            Manage contexts
2023-03-30T15:25:53.6930581Z           helloworld*        A basic Hello World plugin for tests (Docker Inc., testing)
2023-03-30T15:25:53.6930871Z           image              Manage images
2023-03-30T15:25:53.6931168Z           manifest           Manage Docker image manifests and manifest lists
2023-03-30T15:25:53.6931549Z           nopersistentprerun*Testing without PersistentPreRun hooks (Docker Inc., testing)
2023-03-30T15:25:53.6931866Z           plugin             Manage plugins
2023-03-30T15:25:53.6932114Z           system             Manage Docker
2023-03-30T15:25:53.6932377Z           trust              Manage trust on Docker images
2023-03-30T15:25:53.6932643Z           volume             Manage volumes
2023-03-30T15:25:53.6932841Z         
2023-03-30T15:25:53.6933036Z         Swarm Commands:
2023-03-30T15:25:53.6933278Z           config             Manage Swarm configs
2023-03-30T15:25:53.6933519Z           node               Manage Swarm nodes
2023-03-30T15:25:53.6934038Z           secret             Manage Swarm secrets
2023-03-30T15:25:53.6934302Z           service            Manage Swarm services
2023-03-30T15:25:53.6934550Z           stack              Manage Swarm stacks
2023-03-30T15:25:53.6934795Z           swarm              Manage Swarm
2023-03-30T15:25:53.6935006Z         
2023-03-30T15:25:53.6935179Z         Commands:
2023-03-30T15:25:53.6935493Z           attach             Attach local standard input, output, and error streams to a running container
2023-03-30T15:25:53.6935965Z           commit             Create a new image from a container's changes
2023-03-30T15:25:53.6936298Z           cp                 Copy files/folders between a container and the local filesystem
2023-03-30T15:25:53.6936617Z           create             Create a new container
2023-03-30T15:25:53.6937053Z           diff               Inspect changes to files or directories on a container's filesystem
2023-03-30T15:25:53.6937404Z           events             Get real time events from the server
2023-03-30T15:25:53.6937795Z           export             Export a container's filesystem as a tar archive
2023-03-30T15:25:53.6938105Z           history            Show the history of an image
2023-03-30T15:25:53.6938436Z           import             Import the contents from a tarball to create a filesystem image
2023-03-30T15:25:53.6938862Z           inspect            Return low-level information on Docker objects
2023-03-30T15:25:53.6939179Z           kill               Kill one or more running containers
2023-03-30T15:25:53.6939487Z           load               Load an image from a tar archive or STDIN
2023-03-30T15:25:53.6939783Z           logs               Fetch the logs of a container
2023-03-30T15:25:53.6940089Z           pause              Pause all processes within one or more containers
2023-03-30T15:25:53.6940443Z           port               List port mappings or a specific mapping for the container
2023-03-30T15:25:53.6940748Z           rename             Rename a container
2023-03-30T15:25:53.6941174Z           restart            Restart one or more containers
2023-03-30T15:25:53.6941461Z           rm                 Remove one or more containers
2023-03-30T15:25:53.6941732Z           rmi                Remove one or more images
2023-03-30T15:25:53.6942047Z           save               Save one or more images to a tar archive (streamed to STDOUT by default)
2023-03-30T15:25:53.6942388Z           start              Start one or more stopped containers
2023-03-30T15:25:53.6942727Z           stats              Display a live stream of container(s) resource usage statistics
2023-03-30T15:25:53.6943056Z           stop               Stop one or more running containers
2023-03-30T15:25:53.6943485Z           tag                Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
2023-03-30T15:25:53.7041328Z           top                Display the running processes of a container
2023-03-30T15:25:53.7041807Z           unpause            Unpause all processes within one or more containers
2023-03-30T15:25:53.7042163Z           update             Update configuration of one or more containers
2023-03-30T15:25:53.7042540Z           wait               Block until one or more containers stop, then print their exit codes
2023-03-30T15:25:53.7042821Z         
2023-03-30T15:25:53.7043027Z         Invalid Plugins:
2023-03-30T15:25:53.7043595Z           badmeta            invalid metadata: invalid character 'i' looking for beginning of object key string
2023-03-30T15:25:53.7043895Z         
2023-03-30T15:25:53.7044095Z         Global Options:
2023-03-30T15:25:53.7044456Z               --config string      Location of client config files (default
2023-03-30T15:25:53.7044763Z                                    "/root/.docker")
2023-03-30T15:25:53.7045159Z           -c, --context string     Name of the context to use to connect to the
2023-03-30T15:25:53.7045486Z                                    daemon (overrides DOCKER_HOST env var and
2023-03-30T15:25:53.7045813Z                                    default context set with "docker context use")
2023-03-30T15:25:53.7046175Z           -D, --debug              Enable debug mode
2023-03-30T15:25:53.7046550Z           -H, --host list          Daemon socket(s) to connect to
2023-03-30T15:25:53.7046950Z           -l, --log-level string   Set the logging level ("debug", "info",
2023-03-30T15:25:53.7047282Z                                    "warn", "error", "fatal") (default "info")
2023-03-30T15:25:53.7047659Z               --tls                Use TLS; implied by --tlsverify
2023-03-30T15:25:53.7048063Z               --tlscacert string   Trust certs signed only by this CA (default
2023-03-30T15:25:53.7048370Z                                    "/root/.docker/ca.pem")
2023-03-30T15:25:53.7048764Z               --tlscert string     Path to TLS certificate file (default
2023-03-30T15:25:53.7049058Z                                    "/root/.docker/cert.pem")
2023-03-30T15:25:53.7049422Z               --tlskey string      Path to TLS key file (default
2023-03-30T15:25:53.7049715Z                                    "/root/.docker/key.pem")
2023-03-30T15:25:53.7050074Z               --tlsverify          Use TLS and verify the remote
2023-03-30T15:25:53.7050457Z           -v, --version            Print version information and quit
2023-03-30T15:25:53.7050708Z         
2023-03-30T15:25:53.7062709Z         Run 'docker COMMAND --help' for more information on a command.
2023-03-30T15:25:53.7062973Z         
2023-03-30T15:25:53.7063285Z         For more help on how to use Docker, head to https://docs.docker.com/go/guides/
2023-03-30T15:25:53.7063578Z         
2023-03-30T15:25:53.7063753Z         Stderr:   
2023-03-30T15:25:53.7063966Z         
2023-03-30T15:25:53.7064152Z         Failures:
2023-03-30T15:25:53.7074562Z         Expected stdout to contain "Flag shorthand -h has been deprecated, please use --help\n\nUsage:  docker [OPTIONS] COMMAND\n\nA self-sufficient runtime for containers\n\nCommon Commands:\n  run                Create and run a new container from an image\n  exec               Execute a command in a running container\n  ps                 List containers\n  build              Build an image from a Dockerfile\n  pull               Download an image from a registry\n  push               Upload an image to a registry\n  images             List images\n  login              Log in to a registry\n  logout             Log out from a registry\n  search             Search Docker Hub for images\n  version            Show the Docker version information\n  info               Display system-wide information\n\nManagement Commands:\n  builder            Manage builds\n  buildx*            Docker Buildx (Docker Inc., v0.10.4)\n  container          Manage containers\n  context            Manage contexts\n  helloworld*        A basic Hello World plugin for tests (Docker Inc., testing)\n  image              Manage images\n  manifest           Manage Docker image manifests and manifest lists\n  network            Manage networks\n  nopersistentprerun*Testing without PersistentPreRun hooks (Docker Inc., testing)\n  plugin             Manage plugins\n  system             Manage Docker\n  trust              Manage trust on Docker images\n  volume             Manage volumes\n\nSwarm Commands:\n  config             Manage Swarm configs\n  node               Manage Swarm nodes\n  secret             Manage Swarm secrets\n  service            Manage Swarm services\n  stack              Manage Swarm stacks\n  swarm              Manage Swarm\n\nCommands:\n  attach             Attach local standard input, output, and error streams to a running container\n  commit             Create a new image from a container's changes\n  cp                 Copy files/folders between a container and the local filesystem\n  create             Create a new container\n  diff               Inspect changes to files or directories on a container's filesystem\n  events             Get real time events from the server\n  export             Export a container's filesystem as a tar archive\n  history            Show the history of an image\n  import             Import the contents from a tarball to create a filesystem image\n  inspect            Return low-level information on Docker objects\n  kill               Kill one or more running containers\n  load               Load an image from a tar archive or STDIN\n  logs               Fetch the logs of a container\n  pause              Pause all processes within one or more containers\n  port               List port mappings or a specific mapping for the container\n  rename             Rename a container\n  restart            Restart one or more containers\n  rm                 Remove one or more containers\n  rmi                Remove one or more images\n  save               Save one or more images to a tar archive (streamed to STDOUT by default)\n  start              Start one or more stopped containers\n  stats              Display a live stream of container(s) resource usage statistics\n  stop               Stop one or more running containers\n  tag                Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE\n  top                Display the running processes of a container\n  unpause            Unpause all processes within one or more containers\n  update             Update configuration of one or more containers\n  wait               Block until one or more containers stop, then print their exit codes\n\nInvalid Plugins:\n  badmeta            invalid metadata: invalid character 'i' looking for beginning of object key string\n\nGlobal Options:\n      --config string      Location of client config files (default\n                           \"/root/.docker\")\n  -c, --context string     Name of the context to use to connect to the\n                           daemon (overrides DOCKER_HOST env var and\n                           default context set with \"docker context use\")\n  -D, --debug              Enable debug mode\n  -H, --host list          Daemon socket(s) to connect to\n  -l, --log-level string   Set the logging level (\"debug\", \"info\",\n                           \"warn\", \"error\", \"fatal\") (default \"info\")\n      --tls                Use TLS; implied by --tlsverify\n      --tlscacert string   Trust certs signed only by this CA (default\n                           \"/root/.docker/ca.pem\")\n      --tlscert string     Path to TLS certificate file (default\n                           \"/root/.docker/cert.pem\")\n      --tlskey string      Path to TLS key file (default\n                           \"/root/.docker/key.pem\")\n      --tlsverify          Use TLS and verify the remote\n  -v, --version            Print version information and quit\n\nRun 'docker COMMAND --help' for more information on a command.\n\nFor more help on how to use Docker, head to https://docs.docker.com/go/guides/\n"

@thaJeztah thaJeztah marked this pull request as ready for review March 30, 2023 15:43
@thaJeztah
Copy link
Member Author

@rumpl @vvoland @tianon ptal 🤗 🙈

@thaJeztah
Copy link
Member Author

Thx! Let me bring this one in ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants