From f5cda4359ee197dd6753e9b7e28c1966c32b7a58 Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Wed, 8 May 2024 09:54:20 +0200 Subject: [PATCH] add contextcheck linter exceptions Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- pkg/approve/approve.go | 1 + pkg/check/api/api.go | 1 + pkg/create/certificaterequest/certificaterequest.go | 1 + .../certificatesigningrequest/certificatesigningrequest.go | 1 + pkg/deny/deny.go | 1 + pkg/inspect/secret/secret.go | 1 + pkg/install/install.go | 1 + pkg/renew/renew.go | 1 + pkg/status/certificate/certificate.go | 1 + pkg/uninstall/uninstall.go | 1 + pkg/upgrade/migrateapiversion/command.go | 1 + pkg/version/version.go | 1 + 12 files changed, 12 insertions(+) diff --git a/pkg/approve/approve.go b/pkg/approve/approve.go index 143bc82..8691687 100644 --- a/pkg/approve/approve.go +++ b/pkg/approve/approve.go @@ -79,6 +79,7 @@ func NewCmdApprove(setupCtx context.Context, ioStreams genericclioptions.IOStrea PreRunE: func(cmd *cobra.Command, args []string) error { return o.Validate(args) }, + // nolint:contextcheck // False positive RunE: func(cmd *cobra.Command, args []string) error { return o.Run(cmd.Context(), args) }, diff --git a/pkg/check/api/api.go b/pkg/check/api/api.go index e963ded..6a977bb 100644 --- a/pkg/check/api/api.go +++ b/pkg/check/api/api.go @@ -92,6 +92,7 @@ func NewCmdCheckApi(setupCtx context.Context, ioStreams genericclioptions.IOStre PreRunE: func(cmd *cobra.Command, args []string) error { return o.Complete() }, + // nolint:contextcheck // False positive RunE: func(cmd *cobra.Command, args []string) error { return o.Run(cmd.Context()) }, diff --git a/pkg/create/certificaterequest/certificaterequest.go b/pkg/create/certificaterequest/certificaterequest.go index 8121612..e8df487 100644 --- a/pkg/create/certificaterequest/certificaterequest.go +++ b/pkg/create/certificaterequest/certificaterequest.go @@ -115,6 +115,7 @@ func NewCmdCreateCR(setupCtx context.Context, ioStreams genericclioptions.IOStre PreRunE: func(cmd *cobra.Command, args []string) error { return o.Validate(args) }, + // nolint:contextcheck // False positive RunE: func(cmd *cobra.Command, args []string) error { return o.Run(cmd.Context(), args) }, diff --git a/pkg/create/certificatesigningrequest/certificatesigningrequest.go b/pkg/create/certificatesigningrequest/certificatesigningrequest.go index e2195ac..4d6e76a 100644 --- a/pkg/create/certificatesigningrequest/certificatesigningrequest.go +++ b/pkg/create/certificatesigningrequest/certificatesigningrequest.go @@ -127,6 +127,7 @@ func NewCmdCreateCSR(setupCtx context.Context, ioStreams genericclioptions.IOStr PreRunE: func(cmd *cobra.Command, args []string) error { return o.Validate(args) }, + // nolint:contextcheck // False positive RunE: func(cmd *cobra.Command, args []string) error { return o.Run(cmd.Context(), args) }, diff --git a/pkg/deny/deny.go b/pkg/deny/deny.go index c08f83f..474519c 100644 --- a/pkg/deny/deny.go +++ b/pkg/deny/deny.go @@ -79,6 +79,7 @@ func NewCmdDeny(setupCtx context.Context, ioStreams genericclioptions.IOStreams) PreRunE: func(cmd *cobra.Command, args []string) error { return o.Validate(args) }, + // nolint:contextcheck // False positive RunE: func(cmd *cobra.Command, args []string) error { return o.Run(cmd.Context(), args) }, diff --git a/pkg/inspect/secret/secret.go b/pkg/inspect/secret/secret.go index ac99988..f430b7d 100644 --- a/pkg/inspect/secret/secret.go +++ b/pkg/inspect/secret/secret.go @@ -117,6 +117,7 @@ func NewCmdInspectSecret(setupCtx context.Context, ioStreams genericclioptions.I PreRunE: func(cmd *cobra.Command, args []string) error { return o.Validate(args) }, + // nolint:contextcheck // False positive RunE: func(cmd *cobra.Command, args []string) error { return o.Run(cmd.Context(), args, ioStreams.Out) }, diff --git a/pkg/install/install.go b/pkg/install/install.go index 1ecf116..510b172 100644 --- a/pkg/install/install.go +++ b/pkg/install/install.go @@ -90,6 +90,7 @@ func NewCmdInstall(setupCtx context.Context, ioStreams genericclioptions.IOStrea Use: "install", Short: "Install cert-manager", Long: installDesc(), + // nolint:contextcheck // False positive RunE: func(cmd *cobra.Command, args []string) error { options.client.Namespace = settings.Namespace() diff --git a/pkg/renew/renew.go b/pkg/renew/renew.go index 1b71ae9..729a34e 100644 --- a/pkg/renew/renew.go +++ b/pkg/renew/renew.go @@ -83,6 +83,7 @@ func NewCmdRenew(setupCtx context.Context, ioStreams genericclioptions.IOStreams PreRunE: func(cmd *cobra.Command, args []string) error { return o.Validate(cmd, args) }, + // nolint:contextcheck // False positive RunE: func(cmd *cobra.Command, args []string) error { return o.Run(cmd.Context(), args) }, diff --git a/pkg/status/certificate/certificate.go b/pkg/status/certificate/certificate.go index 7db08b4..d36a9fe 100644 --- a/pkg/status/certificate/certificate.go +++ b/pkg/status/certificate/certificate.go @@ -96,6 +96,7 @@ func NewCmdStatusCert(setupCtx context.Context, ioStreams genericclioptions.IOSt PreRunE: func(cmd *cobra.Command, args []string) error { return o.Validate(args) }, + // nolint:contextcheck // False positive RunE: func(cmd *cobra.Command, args []string) error { return o.Run(cmd.Context(), args) }, diff --git a/pkg/uninstall/uninstall.go b/pkg/uninstall/uninstall.go index d534ba6..d0857b4 100644 --- a/pkg/uninstall/uninstall.go +++ b/pkg/uninstall/uninstall.go @@ -87,6 +87,7 @@ func NewCmd(setupCtx context.Context, ioStreams genericclioptions.IOStreams) *co Use: "uninstall", Short: "Uninstall cert-manager", Long: description(), + // nolint:contextcheck // False positive RunE: func(cmd *cobra.Command, args []string) error { res, err := run(cmd.Context(), options) if err != nil { diff --git a/pkg/upgrade/migrateapiversion/command.go b/pkg/upgrade/migrateapiversion/command.go index f2a4121..7a1d00b 100644 --- a/pkg/upgrade/migrateapiversion/command.go +++ b/pkg/upgrade/migrateapiversion/command.go @@ -86,6 +86,7 @@ func NewCmdMigrate(setupCtx context.Context, ioStreams genericclioptions.IOStrea return o.Complete() }, + // nolint:contextcheck // False positive RunE: func(cmd *cobra.Command, args []string) error { return o.Run(cmd.Context(), args) }, diff --git a/pkg/version/version.go b/pkg/version/version.go index 141a6af..e26ccee 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -105,6 +105,7 @@ func NewCmdVersion(setupCtx context.Context, ioStreams genericclioptions.IOStrea return o.Complete() }, + // nolint:contextcheck // False positive RunE: func(cmd *cobra.Command, args []string) error { return o.Run(cmd.Context()) },