diff --git a/.github/workflows/lint-sample.yml b/.github/workflows/lint-sample.yml index fa51c7f66c..fdb4d9f5fa 100644 --- a/.github/workflows/lint-sample.yml +++ b/.github/workflows/lint-sample.yml @@ -40,14 +40,14 @@ jobs: - name: Run linter uses: golangci/golangci-lint-action@v4 with: - version: v1.54 + version: v1.57 working-directory: testdata/project-v4-with-deploy-image args: --config .golangci.yml ./... skip-cache: true # first lint action will handle - name: Run linter uses: golangci/golangci-lint-action@v4 with: - version: v1.54 + version: v1.57 working-directory: testdata/project-v4-multigroup-with-deploy-image args: --config .golangci.yml ./... skip-cache: true # first lint action will handle diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index be72f8a71f..20f21e8a6d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,7 +21,7 @@ jobs: - name: Run linter uses: golangci/golangci-lint-action@v4 with: - version: v1.54 + version: v1.57 yamllint: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index e61ad169af..054060cce6 100644 --- a/Makefile +++ b/Makefile @@ -104,7 +104,7 @@ GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint golangci-lint: @[ -f $(GOLANGCI_LINT) ] || { \ set -e ;\ - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.54.2 ;\ + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell dirname $(GOLANGCI_LINT)) v1.57.2 ;\ } .PHONY: apidiff diff --git a/docs/book/src/component-config-tutorial/testdata/project/Makefile b/docs/book/src/component-config-tutorial/testdata/project/Makefile index b397beb0af..c78348a151 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/Makefile +++ b/docs/book/src/component-config-tutorial/testdata/project/Makefile @@ -161,7 +161,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION) KUSTOMIZE_VERSION ?= v5.3.0 CONTROLLER_TOOLS_VERSION ?= v0.14.0 ENVTEST_VERSION ?= release-0.17 -GOLANGCI_LINT_VERSION ?= v1.54.2 +GOLANGCI_LINT_VERSION ?= v1.57.2 .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. diff --git a/docs/book/src/component-config-tutorial/testdata/project/test/e2e/e2e_suite_test.go b/docs/book/src/component-config-tutorial/testdata/project/test/e2e/e2e_suite_test.go index a2d85acad7..6b2671bd50 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/test/e2e/e2e_suite_test.go +++ b/docs/book/src/component-config-tutorial/testdata/project/test/e2e/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/docs/book/src/component-config-tutorial/testdata/project/test/e2e/e2e_test.go b/docs/book/src/component-config-tutorial/testdata/project/test/e2e/e2e_test.go index 1193e5f153..171480b435 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/test/e2e/e2e_test.go +++ b/docs/book/src/component-config-tutorial/testdata/project/test/e2e/e2e_test.go @@ -21,7 +21,9 @@ import ( "os/exec" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "tutorial.kubebuilder.io/project/test/utils" diff --git a/docs/book/src/component-config-tutorial/testdata/project/test/utils/utils.go b/docs/book/src/component-config-tutorial/testdata/project/test/utils/utils.go index 31454d2fc4..6ad98ac115 100644 --- a/docs/book/src/component-config-tutorial/testdata/project/test/utils/utils.go +++ b/docs/book/src/component-config-tutorial/testdata/project/test/utils/utils.go @@ -22,6 +22,7 @@ import ( "os/exec" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" //nolint:golint,revive ) diff --git a/docs/book/src/cronjob-tutorial/testdata/project/Makefile b/docs/book/src/cronjob-tutorial/testdata/project/Makefile index b397beb0af..c78348a151 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/Makefile +++ b/docs/book/src/cronjob-tutorial/testdata/project/Makefile @@ -161,7 +161,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION) KUSTOMIZE_VERSION ?= v5.3.0 CONTROLLER_TOOLS_VERSION ?= v0.14.0 ENVTEST_VERSION ?= release-0.17 -GOLANGCI_LINT_VERSION ?= v1.54.2 +GOLANGCI_LINT_VERSION ?= v1.57.2 .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. diff --git a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_webhook_test.go b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_webhook_test.go index 4584d9b0cf..47913d5e44 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_webhook_test.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/cronjob_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/webhook_suite_test.go b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/webhook_suite_test.go index fb1864f8cb..403d656e9e 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/api/v1/webhook_suite_test.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/api/v1/webhook_suite_test.go @@ -26,10 +26,12 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" - admissionv1 "k8s.io/api/admission/v1" + //+kubebuilder:scaffold:imports apimachineryruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/cronjob_controller_test.go b/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/cronjob_controller_test.go index 9b95c3d362..2497d04783 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/cronjob_controller_test.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/cronjob_controller_test.go @@ -29,7 +29,9 @@ import ( "reflect" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" batchv1 "k8s.io/api/batch/v1" v1 "k8s.io/api/core/v1" diff --git a/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/suite_test.go b/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/suite_test.go index 1b5f665a1a..1f18ebbdd2 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/suite_test.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/suite_test.go @@ -34,7 +34,9 @@ import ( ctrl "sigs.k8s.io/controller-runtime" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_suite_test.go b/docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_suite_test.go index a2d85acad7..6b2671bd50 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_suite_test.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_test.go b/docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_test.go index 1193e5f153..171480b435 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_test.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_test.go @@ -21,7 +21,9 @@ import ( "os/exec" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "tutorial.kubebuilder.io/project/test/utils" diff --git a/docs/book/src/cronjob-tutorial/testdata/project/test/utils/utils.go b/docs/book/src/cronjob-tutorial/testdata/project/test/utils/utils.go index 31454d2fc4..6ad98ac115 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/test/utils/utils.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/test/utils/utils.go @@ -22,6 +22,7 @@ import ( "os/exec" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" //nolint:golint,revive ) diff --git a/docs/book/src/getting-started/testdata/project/Makefile b/docs/book/src/getting-started/testdata/project/Makefile index b397beb0af..c78348a151 100644 --- a/docs/book/src/getting-started/testdata/project/Makefile +++ b/docs/book/src/getting-started/testdata/project/Makefile @@ -161,7 +161,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION) KUSTOMIZE_VERSION ?= v5.3.0 CONTROLLER_TOOLS_VERSION ?= v0.14.0 ENVTEST_VERSION ?= release-0.17 -GOLANGCI_LINT_VERSION ?= v1.54.2 +GOLANGCI_LINT_VERSION ?= v1.57.2 .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. diff --git a/docs/book/src/getting-started/testdata/project/internal/controller/memcached_controller_test.go b/docs/book/src/getting-started/testdata/project/internal/controller/memcached_controller_test.go index 66b20cf0d5..ae5935e6a5 100644 --- a/docs/book/src/getting-started/testdata/project/internal/controller/memcached_controller_test.go +++ b/docs/book/src/getting-started/testdata/project/internal/controller/memcached_controller_test.go @@ -23,7 +23,9 @@ import ( "time" //nolint:golint + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/docs/book/src/getting-started/testdata/project/internal/controller/suite_test.go b/docs/book/src/getting-started/testdata/project/internal/controller/suite_test.go index baccfcfac3..a7e2663fa0 100644 --- a/docs/book/src/getting-started/testdata/project/internal/controller/suite_test.go +++ b/docs/book/src/getting-started/testdata/project/internal/controller/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/docs/book/src/getting-started/testdata/project/test/e2e/e2e_suite_test.go b/docs/book/src/getting-started/testdata/project/test/e2e/e2e_suite_test.go index a2d85acad7..6b2671bd50 100644 --- a/docs/book/src/getting-started/testdata/project/test/e2e/e2e_suite_test.go +++ b/docs/book/src/getting-started/testdata/project/test/e2e/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/docs/book/src/getting-started/testdata/project/test/e2e/e2e_test.go b/docs/book/src/getting-started/testdata/project/test/e2e/e2e_test.go index c6b17a62f5..648efab690 100644 --- a/docs/book/src/getting-started/testdata/project/test/e2e/e2e_test.go +++ b/docs/book/src/getting-started/testdata/project/test/e2e/e2e_test.go @@ -21,7 +21,9 @@ import ( "os/exec" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "example.com/memcached/test/utils" diff --git a/docs/book/src/getting-started/testdata/project/test/utils/utils.go b/docs/book/src/getting-started/testdata/project/test/utils/utils.go index 31454d2fc4..6ad98ac115 100644 --- a/docs/book/src/getting-started/testdata/project/test/utils/utils.go +++ b/docs/book/src/getting-started/testdata/project/test/utils/utils.go @@ -22,6 +22,7 @@ import ( "os/exec" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" //nolint:golint,revive ) diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/cronjob_webhook_test.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/cronjob_webhook_test.go index 6ef09d6460..95dfcbcc08 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/cronjob_webhook_test.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/cronjob_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/webhook_suite_test.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/webhook_suite_test.go index fb1864f8cb..7fb5b99209 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v1/webhook_suite_test.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v1/webhook_suite_test.go @@ -26,7 +26,9 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" admissionv1 "k8s.io/api/admission/v1" diff --git a/docs/book/src/multiversion-tutorial/testdata/project/api/v2/webhook_suite_test.go b/docs/book/src/multiversion-tutorial/testdata/project/api/v2/webhook_suite_test.go index 63eda98575..388893b845 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/api/v2/webhook_suite_test.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/api/v2/webhook_suite_test.go @@ -26,7 +26,9 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" admissionv1 "k8s.io/api/admission/v1" diff --git a/docs/book/src/multiversion-tutorial/testdata/project/internal/controller/suite_test.go b/docs/book/src/multiversion-tutorial/testdata/project/internal/controller/suite_test.go index 36b040b6c3..b9a79e89ec 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/internal/controller/suite_test.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/internal/controller/suite_test.go @@ -25,7 +25,9 @@ import ( ctrl "sigs.k8s.io/controller-runtime" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_suite_test.go b/docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_suite_test.go index a2d85acad7..6b2671bd50 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_suite_test.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_test.go b/docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_test.go index 1193e5f153..171480b435 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_test.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_test.go @@ -21,7 +21,9 @@ import ( "os/exec" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "tutorial.kubebuilder.io/project/test/utils" diff --git a/docs/book/src/multiversion-tutorial/testdata/project/test/utils/utils.go b/docs/book/src/multiversion-tutorial/testdata/project/test/utils/utils.go index 0c91bc93d2..449e0ec50a 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/test/utils/utils.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/test/utils/utils.go @@ -22,6 +22,7 @@ import ( "os/exec" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" //nolint:golint,revive ) diff --git a/hack/docs/internal/cronjob-tutorial/writing_tests_controller.go b/hack/docs/internal/cronjob-tutorial/writing_tests_controller.go index 01b8998d6b..d5592f153e 100644 --- a/hack/docs/internal/cronjob-tutorial/writing_tests_controller.go +++ b/hack/docs/internal/cronjob-tutorial/writing_tests_controller.go @@ -47,7 +47,9 @@ import ( "reflect" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" batchv1 "k8s.io/api/batch/v1" v1 "k8s.io/api/core/v1" diff --git a/pkg/cli/alpha/generate.go b/pkg/cli/alpha/generate.go index 4f4f292e1d..d35a4219b1 100644 --- a/pkg/cli/alpha/generate.go +++ b/pkg/cli/alpha/generate.go @@ -32,10 +32,10 @@ using the current version of KubeBuilder binary available. $ kubebuilder alpha generate --input-dir="./test" --output-dir="./my-output" Then we will re-scaffold the project by Kubebuilder in the directory specified by 'output-dir'. `, - PreRunE: func(cmd *cobra.Command, _ []string) error { + PreRunE: func(_ *cobra.Command, _ []string) error { return opts.Validate() }, - Run: func(cmd *cobra.Command, args []string) { + Run: func(_ *cobra.Command, _ []string) { if err := opts.Rescaffold(); err != nil { log.Fatalf("Failed to rescaffold %s", err) } diff --git a/pkg/cli/cli_test.go b/pkg/cli/cli_test.go index ae5f8c7023..1789722642 100644 --- a/pkg/cli/cli_test.go +++ b/pkg/cli/cli_test.go @@ -22,7 +22,9 @@ import ( "os" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "github.com/spf13/afero" "github.com/spf13/cobra" diff --git a/pkg/cli/completion.go b/pkg/cli/completion.go index 162eb7c072..41029d1a01 100644 --- a/pkg/cli/completion.go +++ b/pkg/cli/completion.go @@ -36,7 +36,7 @@ Linux: MacOS: $ %[1]s completion bash > /usr/local/etc/bash_completion.d/%[1]s `, c.commandName), - RunE: func(cmd *cobra.Command, cmdArgs []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { return cmd.Root().GenBashCompletion(os.Stdout) }, } @@ -55,7 +55,7 @@ $ %[1]s completion zsh > "${fpath[1]}/_%[1]s" # You will need to start a new shell for this setup to take effect. `, c.commandName), - RunE: func(cmd *cobra.Command, cmdArgs []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { return cmd.Root().GenZshCompletion(os.Stdout) }, } @@ -71,7 +71,7 @@ $ %[1]s completion fish | source # To load completions for each session, execute once: $ %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish `, c.commandName), - RunE: func(cmd *cobra.Command, cmdArgs []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { return cmd.Root().GenFishCompletion(os.Stdout, true) }, } @@ -81,7 +81,7 @@ func (CLI) newPowerShellCmd() *cobra.Command { return &cobra.Command{ Use: "powershell", Short: "Load powershell completions", - RunE: func(cmd *cobra.Command, cmdArgs []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { return cmd.Root().GenPowerShellCompletion(os.Stdout) }, } diff --git a/pkg/cli/completion_test.go b/pkg/cli/completion_test.go index ab235b4b0f..7a756368a9 100644 --- a/pkg/cli/completion_test.go +++ b/pkg/cli/completion_test.go @@ -17,7 +17,9 @@ limitations under the License. package cli import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/cli/init.go b/pkg/cli/init.go index f52e3e5f42..38837e5441 100644 --- a/pkg/cli/init.go +++ b/pkg/cli/init.go @@ -39,7 +39,7 @@ func (c CLI) newInitCmd() *cobra.Command { For further help about a specific plugin, set --plugins. `, Example: c.getInitHelpExamples(), - Run: func(cmd *cobra.Command, args []string) {}, + Run: func(_ *cobra.Command, _ []string) {}, } // Register --project-version on the dynamically created command diff --git a/pkg/cli/options_test.go b/pkg/cli/options_test.go index ee6f70b9a5..591494e7f3 100644 --- a/pkg/cli/options_test.go +++ b/pkg/cli/options_test.go @@ -23,7 +23,9 @@ import ( "path/filepath" "runtime" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "github.com/spf13/afero" "github.com/spf13/cobra" @@ -383,7 +385,7 @@ var _ = Describe("Discover external plugins", func() { It("should fail if pluginsroot is empty", func() { errPluginsRoot := errors.New("could not retrieve plugins root") - retrievePluginsRoot = func(host string) (string, error) { + retrievePluginsRoot = func(_ string) (string, error) { return "", errPluginsRoot } @@ -394,7 +396,7 @@ var _ = Describe("Discover external plugins", func() { }) It("should skip parsing of directories if plugins root is not a directory", func() { - retrievePluginsRoot = func(host string) (string, error) { + retrievePluginsRoot = func(_ string) (string, error) { return "externalplugin.sh", nil } diff --git a/pkg/cli/resource_test.go b/pkg/cli/resource_test.go index 817da08173..0a57a4c3f4 100644 --- a/pkg/cli/resource_test.go +++ b/pkg/cli/resource_test.go @@ -17,7 +17,9 @@ limitations under the License. package cli import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/model/resource" diff --git a/pkg/cli/root.go b/pkg/cli/root.go index 7ee54e1768..591babb6f7 100644 --- a/pkg/cli/root.go +++ b/pkg/cli/root.go @@ -38,7 +38,7 @@ func (c CLI) newRootCmd() *cobra.Command { Use: c.commandName, Long: c.description, Example: c.rootExamples(), - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { return cmd.Help() }, } diff --git a/pkg/cli/suite_test.go b/pkg/cli/suite_test.go index fa7289dec4..594817285c 100644 --- a/pkg/cli/suite_test.go +++ b/pkg/cli/suite_test.go @@ -19,7 +19,9 @@ package cli import ( "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/config" diff --git a/pkg/cli/version_test.go b/pkg/cli/version_test.go index e8f54b0fcd..d072df4bd9 100644 --- a/pkg/cli/version_test.go +++ b/pkg/cli/version_test.go @@ -17,7 +17,9 @@ limitations under the License. package cli import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/config/errors_test.go b/pkg/config/errors_test.go index e77faaf1f0..57947bccae 100644 --- a/pkg/config/errors_test.go +++ b/pkg/config/errors_test.go @@ -19,7 +19,9 @@ package config import ( "fmt" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/model/resource" diff --git a/pkg/config/registry_test.go b/pkg/config/registry_test.go index 11e9ea408c..00f3871e30 100644 --- a/pkg/config/registry_test.go +++ b/pkg/config/registry_test.go @@ -17,7 +17,9 @@ limitations under the License. package config import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/config/store/errors_test.go b/pkg/config/store/errors_test.go index ef62a6efe9..96b3afc489 100644 --- a/pkg/config/store/errors_test.go +++ b/pkg/config/store/errors_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/config/store/yaml/store_test.go b/pkg/config/store/yaml/store_test.go index d4afb6dad8..aa1b846447 100644 --- a/pkg/config/store/yaml/store_test.go +++ b/pkg/config/store/yaml/store_test.go @@ -21,7 +21,9 @@ import ( "os" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "github.com/spf13/afero" diff --git a/pkg/config/suite_test.go b/pkg/config/suite_test.go index 697d58bf81..2e9110f602 100644 --- a/pkg/config/suite_test.go +++ b/pkg/config/suite_test.go @@ -19,7 +19,9 @@ package config import ( "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/config/v2/config_test.go b/pkg/config/v2/config_test.go index 57d65a6b4f..d9cf965a50 100644 --- a/pkg/config/v2/config_test.go +++ b/pkg/config/v2/config_test.go @@ -20,7 +20,9 @@ package v2 import ( "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/model/resource" diff --git a/pkg/config/v3/config_test.go b/pkg/config/v3/config_test.go index fc08295597..e3cc785953 100644 --- a/pkg/config/v3/config_test.go +++ b/pkg/config/v3/config_test.go @@ -21,7 +21,9 @@ import ( "sort" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/config" diff --git a/pkg/config/version_test.go b/pkg/config/version_test.go index 0fcaad14a6..d2f61d0bd2 100644 --- a/pkg/config/version_test.go +++ b/pkg/config/version_test.go @@ -19,7 +19,9 @@ package config import ( "sort" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/model/stage" diff --git a/pkg/internal/validation/dns_test.go b/pkg/internal/validation/dns_test.go index b3ec7925bc..74e6602f8d 100644 --- a/pkg/internal/validation/dns_test.go +++ b/pkg/internal/validation/dns_test.go @@ -21,7 +21,9 @@ import ( "strings" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/machinery/errors_test.go b/pkg/machinery/errors_test.go index 67f1bc1ebc..9f8e925ccb 100644 --- a/pkg/machinery/errors_test.go +++ b/pkg/machinery/errors_test.go @@ -20,7 +20,9 @@ import ( "errors" "path/filepath" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/machinery/funcmap_test.go b/pkg/machinery/funcmap_test.go index 375b63d86a..52fd67d214 100644 --- a/pkg/machinery/funcmap_test.go +++ b/pkg/machinery/funcmap_test.go @@ -17,7 +17,9 @@ limitations under the License. package machinery import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/machinery/injector_test.go b/pkg/machinery/injector_test.go index c9c2b76e6e..c834f76d40 100644 --- a/pkg/machinery/injector_test.go +++ b/pkg/machinery/injector_test.go @@ -17,7 +17,9 @@ limitations under the License. package machinery import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/config" diff --git a/pkg/machinery/machinery_suite_test.go b/pkg/machinery/machinery_suite_test.go index 8d246b8292..0cfef87dd0 100644 --- a/pkg/machinery/machinery_suite_test.go +++ b/pkg/machinery/machinery_suite_test.go @@ -19,7 +19,9 @@ package machinery import ( "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/machinery/marker_test.go b/pkg/machinery/marker_test.go index 27a58656e0..0d506350db 100644 --- a/pkg/machinery/marker_test.go +++ b/pkg/machinery/marker_test.go @@ -17,7 +17,9 @@ limitations under the License. package machinery import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/machinery/mixins_test.go b/pkg/machinery/mixins_test.go index df43f3a5c0..a5af0f0b46 100644 --- a/pkg/machinery/mixins_test.go +++ b/pkg/machinery/mixins_test.go @@ -17,7 +17,9 @@ limitations under the License. package machinery import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/model/resource" diff --git a/pkg/machinery/scaffold_test.go b/pkg/machinery/scaffold_test.go index 6cf14ddebd..192e2af2ea 100644 --- a/pkg/machinery/scaffold_test.go +++ b/pkg/machinery/scaffold_test.go @@ -18,7 +18,9 @@ import ( "errors" "os" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "github.com/spf13/afero" diff --git a/pkg/model/resource/api_test.go b/pkg/model/resource/api_test.go index fbce493e50..21b2cc062f 100644 --- a/pkg/model/resource/api_test.go +++ b/pkg/model/resource/api_test.go @@ -17,7 +17,9 @@ limitations under the License. package resource import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/model/resource/gvk_test.go b/pkg/model/resource/gvk_test.go index 8b93bef4dd..cb9ae82d63 100644 --- a/pkg/model/resource/gvk_test.go +++ b/pkg/model/resource/gvk_test.go @@ -19,7 +19,9 @@ package resource import ( "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/model/resource/resource_test.go b/pkg/model/resource/resource_test.go index 5935d02e2f..5b104db36e 100644 --- a/pkg/model/resource/resource_test.go +++ b/pkg/model/resource/resource_test.go @@ -17,7 +17,9 @@ limitations under the License. package resource import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/model/resource/suite_test.go b/pkg/model/resource/suite_test.go index bd240d657a..2ec6ab8684 100644 --- a/pkg/model/resource/suite_test.go +++ b/pkg/model/resource/suite_test.go @@ -19,7 +19,9 @@ package resource import ( "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/model/resource/utils_test.go b/pkg/model/resource/utils_test.go index 9e1451a321..b9b742ca06 100644 --- a/pkg/model/resource/utils_test.go +++ b/pkg/model/resource/utils_test.go @@ -19,7 +19,9 @@ package resource import ( "path" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/model/resource/webhooks_test.go b/pkg/model/resource/webhooks_test.go index 4b0d6bd913..8c0973b05b 100644 --- a/pkg/model/resource/webhooks_test.go +++ b/pkg/model/resource/webhooks_test.go @@ -17,7 +17,9 @@ limitations under the License. package resource import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/model/stage/stage_test.go b/pkg/model/stage/stage_test.go index 7368e224eb..e07f169742 100644 --- a/pkg/model/stage/stage_test.go +++ b/pkg/model/stage/stage_test.go @@ -21,6 +21,7 @@ import ( "testing" g "github.com/onsi/ginkgo/v2" // An alias is required because Context is defined elsewhere in this package. + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/plugin/bundle_test.go b/pkg/plugin/bundle_test.go index ccb1a41d57..2c225ffad8 100644 --- a/pkg/plugin/bundle_test.go +++ b/pkg/plugin/bundle_test.go @@ -19,7 +19,9 @@ package plugin import ( "sort" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/config" diff --git a/pkg/plugin/errors_test.go b/pkg/plugin/errors_test.go index aeea88e281..4dd46e8478 100644 --- a/pkg/plugin/errors_test.go +++ b/pkg/plugin/errors_test.go @@ -17,7 +17,9 @@ limitations under the License. package plugin import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/plugin/filter_test.go b/pkg/plugin/filter_test.go index 626de97773..464ed0bddd 100644 --- a/pkg/plugin/filter_test.go +++ b/pkg/plugin/filter_test.go @@ -17,7 +17,9 @@ limitations under the License. package plugin import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/config" diff --git a/pkg/plugin/helpers_test.go b/pkg/plugin/helpers_test.go index f01caa2505..c26fd4f27a 100644 --- a/pkg/plugin/helpers_test.go +++ b/pkg/plugin/helpers_test.go @@ -19,7 +19,9 @@ package plugin import ( "sort" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/config" diff --git a/pkg/plugin/suite_test.go b/pkg/plugin/suite_test.go index 0938ede0fa..1e0440640b 100644 --- a/pkg/plugin/suite_test.go +++ b/pkg/plugin/suite_test.go @@ -19,7 +19,9 @@ package plugin import ( "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/config" diff --git a/pkg/plugin/util/exec_test.go b/pkg/plugin/util/exec_test.go index 58d449852c..81cf554f96 100644 --- a/pkg/plugin/util/exec_test.go +++ b/pkg/plugin/util/exec_test.go @@ -18,7 +18,9 @@ import ( "os/exec" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/plugin/util/helpers_test.go b/pkg/plugin/util/helpers_test.go index 62553b9ce9..69f2899170 100644 --- a/pkg/plugin/util/helpers_test.go +++ b/pkg/plugin/util/helpers_test.go @@ -19,7 +19,9 @@ package util import ( "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/plugin/util/util_test.go b/pkg/plugin/util/util_test.go index e502934a60..fbbb884e20 100644 --- a/pkg/plugin/util/util_test.go +++ b/pkg/plugin/util/util_test.go @@ -17,7 +17,9 @@ import ( "os" "path/filepath" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/plugin/version_test.go b/pkg/plugin/version_test.go index 771c766034..71d5ce5494 100644 --- a/pkg/plugin/version_test.go +++ b/pkg/plugin/version_test.go @@ -19,7 +19,9 @@ package plugin import ( "sort" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/model/stage" diff --git a/pkg/plugins/external/external_test.go b/pkg/plugins/external/external_test.go index 8941a2b19c..9904eb64c6 100644 --- a/pkg/plugins/external/external_test.go +++ b/pkg/plugins/external/external_test.go @@ -23,7 +23,9 @@ import ( "path/filepath" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "github.com/spf13/afero" "github.com/spf13/pflag" diff --git a/pkg/plugins/golang/deploy-image/v1alpha1/scaffolds/internal/templates/controllers/controller-test.go b/pkg/plugins/golang/deploy-image/v1alpha1/scaffolds/internal/templates/controllers/controller-test.go index a0e2ca1f45..860f4b81e4 100644 --- a/pkg/plugins/golang/deploy-image/v1alpha1/scaffolds/internal/templates/controllers/controller-test.go +++ b/pkg/plugins/golang/deploy-image/v1alpha1/scaffolds/internal/templates/controllers/controller-test.go @@ -84,7 +84,9 @@ import ( "fmt" //nolint:golint + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/pkg/plugins/golang/go_version_test.go b/pkg/plugins/golang/go_version_test.go index f67e40728f..70dc3d5971 100644 --- a/pkg/plugins/golang/go_version_test.go +++ b/pkg/plugins/golang/go_version_test.go @@ -19,7 +19,9 @@ package golang import ( "sort" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/plugins/golang/options_test.go b/pkg/plugins/golang/options_test.go index 1930110093..7e20a20fb7 100644 --- a/pkg/plugins/golang/options_test.go +++ b/pkg/plugins/golang/options_test.go @@ -19,7 +19,9 @@ package golang import ( "path" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/pkg/config" diff --git a/pkg/plugins/golang/suite_test.go b/pkg/plugins/golang/suite_test.go index c38994dd3c..33edd2d463 100644 --- a/pkg/plugins/golang/suite_test.go +++ b/pkg/plugins/golang/suite_test.go @@ -19,7 +19,9 @@ package golang import ( "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/plugins/golang/v2/scaffolds/internal/templates/controllers/controller_suitetest.go b/pkg/plugins/golang/v2/scaffolds/internal/templates/controllers/controller_suitetest.go index d8a0b97505..1b96aa0efb 100644 --- a/pkg/plugins/golang/v2/scaffolds/internal/templates/controllers/controller_suitetest.go +++ b/pkg/plugins/golang/v2/scaffolds/internal/templates/controllers/controller_suitetest.go @@ -127,6 +127,7 @@ import ( "path/filepath" "testing" . "github.com/onsi/ginkgo" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" diff --git a/pkg/plugins/golang/v3/scaffolds/internal/templates/api/webhook_suitetest.go b/pkg/plugins/golang/v3/scaffolds/internal/templates/api/webhook_suitetest.go index c246cddffb..6cb1300c3e 100644 --- a/pkg/plugins/golang/v3/scaffolds/internal/templates/api/webhook_suitetest.go +++ b/pkg/plugins/golang/v3/scaffolds/internal/templates/api/webhook_suitetest.go @@ -140,7 +140,9 @@ import ( "testing" "fmt" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" %s "k8s.io/client-go/kubernetes/scheme" diff --git a/pkg/plugins/golang/v3/scaffolds/internal/templates/controllers/controller_suitetest.go b/pkg/plugins/golang/v3/scaffolds/internal/templates/controllers/controller_suitetest.go index 5daa897ee6..4b49cbaf7e 100644 --- a/pkg/plugins/golang/v3/scaffolds/internal/templates/controllers/controller_suitetest.go +++ b/pkg/plugins/golang/v3/scaffolds/internal/templates/controllers/controller_suitetest.go @@ -131,7 +131,9 @@ import ( "path/filepath" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/api/webhook_suitetest.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/api/webhook_suitetest.go index e8e396deb1..b5f241c4ab 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/api/webhook_suitetest.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/api/webhook_suitetest.go @@ -147,7 +147,9 @@ import ( "time" "runtime" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" %s "k8s.io/client-go/kubernetes/scheme" diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/api/webhook_test_template.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/api/webhook_test_template.go index 9a23081f9e..fb3111b25b 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/api/webhook_test_template.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/api/webhook_test_template.go @@ -75,6 +75,7 @@ const webhookTestTemplate = `{{ .Boilerplate }} package {{ .Resource.Version }} import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/controllers/controller_suitetest.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/controllers/controller_suitetest.go index bffe718186..39e80c5c6b 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/controllers/controller_suitetest.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/controllers/controller_suitetest.go @@ -141,7 +141,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/controllers/controller_test_template.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/controllers/controller_test_template.go index abe04cffb8..b250efbc63 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/controllers/controller_test_template.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/controllers/controller_test_template.go @@ -73,9 +73,11 @@ import ( {{ if .DoAPI -}} "context" {{- end }} + // nolint:revive . "github.com/onsi/ginkgo/v2" {{ if .DoAPI -}} + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go index f61feef765..f041315e04 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/makefile.go @@ -239,7 +239,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION) KUSTOMIZE_VERSION ?= {{ .KustomizeVersion }} CONTROLLER_TOOLS_VERSION ?= {{ .ControllerToolsVersion }} ENVTEST_VERSION ?= {{ .EnvtestVersion }} -GOLANGCI_LINT_VERSION ?= v1.54.2 +GOLANGCI_LINT_VERSION ?= v1.57.2 .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/test/e2e/suite.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/test/e2e/suite.go index 14666e681e..98471fb365 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/test/e2e/suite.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/test/e2e/suite.go @@ -46,7 +46,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/test/e2e/test.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/test/e2e/test.go index 66f93be825..a2e09f130f 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/test/e2e/test.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/test/e2e/test.go @@ -48,7 +48,9 @@ import ( "os/exec" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "{{ .Repo }}/test/utils" diff --git a/pkg/plugins/golang/v4/scaffolds/internal/templates/test/utils/utils.go b/pkg/plugins/golang/v4/scaffolds/internal/templates/test/utils/utils.go index b19f086218..2c744ee4a8 100644 --- a/pkg/plugins/golang/v4/scaffolds/internal/templates/test/utils/utils.go +++ b/pkg/plugins/golang/v4/scaffolds/internal/templates/test/utils/utils.go @@ -47,6 +47,7 @@ import ( "os/exec" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" //nolint:golint,revive ) diff --git a/test/e2e/alphagenerate/e2e_suite_test.go b/test/e2e/alphagenerate/e2e_suite_test.go index eab37e6dac..2a120f4fd5 100644 --- a/test/e2e/alphagenerate/e2e_suite_test.go +++ b/test/e2e/alphagenerate/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/test/e2e/alphagenerate/generate_test.go b/test/e2e/alphagenerate/generate_test.go index 5745cdad17..1943fe4afa 100644 --- a/test/e2e/alphagenerate/generate_test.go +++ b/test/e2e/alphagenerate/generate_test.go @@ -24,7 +24,9 @@ import ( pluginutil "sigs.k8s.io/kubebuilder/v3/pkg/plugin/util" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/test/e2e/utils" diff --git a/test/e2e/deployimage/e2e_suite_test.go b/test/e2e/deployimage/e2e_suite_test.go index cff1a3de4e..c141e10ee4 100644 --- a/test/e2e/deployimage/e2e_suite_test.go +++ b/test/e2e/deployimage/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/test/e2e/deployimage/plugin_cluster_test.go b/test/e2e/deployimage/plugin_cluster_test.go index 66c3fac1b4..9ac795c254 100644 --- a/test/e2e/deployimage/plugin_cluster_test.go +++ b/test/e2e/deployimage/plugin_cluster_test.go @@ -26,12 +26,9 @@ import ( "sigs.k8s.io/kubebuilder/v3/pkg/plugin/util" - //nolint:golint - //nolint:revive + // nolint:revive . "github.com/onsi/ginkgo/v2" - - //nolint:golint - //nolint:revive + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/test/e2e/utils" diff --git a/test/e2e/externalplugin/e2e_suite_test.go b/test/e2e/externalplugin/e2e_suite_test.go index 5c29990003..a20c319f64 100644 --- a/test/e2e/externalplugin/e2e_suite_test.go +++ b/test/e2e/externalplugin/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/test/e2e/externalplugin/generate_test.go b/test/e2e/externalplugin/generate_test.go index cdd3933363..5172950168 100644 --- a/test/e2e/externalplugin/generate_test.go +++ b/test/e2e/externalplugin/generate_test.go @@ -21,15 +21,15 @@ import ( pluginutil "sigs.k8s.io/kubebuilder/v3/pkg/plugin/util" - //nolint:golint - //nolint:revive + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" //nolint:golint - //nolint:revive + // nolint:revive //nolint:golint - //nolint:revive + // nolint:revive "sigs.k8s.io/kubebuilder/v3/test/e2e/utils" ) diff --git a/test/e2e/grafana/e2e_suite_test.go b/test/e2e/grafana/e2e_suite_test.go index c26db06bb0..e46efacdb2 100644 --- a/test/e2e/grafana/e2e_suite_test.go +++ b/test/e2e/grafana/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/test/e2e/grafana/generate_test.go b/test/e2e/grafana/generate_test.go index d32d4eb836..22de1e4f2f 100644 --- a/test/e2e/grafana/generate_test.go +++ b/test/e2e/grafana/generate_test.go @@ -21,12 +21,10 @@ import ( pluginutil "sigs.k8s.io/kubebuilder/v3/pkg/plugin/util" - //nolint:golint - //nolint:revive + // nolint:revive . "github.com/onsi/ginkgo/v2" - //nolint:golint - //nolint:revive + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/test/e2e/utils" diff --git a/test/e2e/utils/kubectl_test.go b/test/e2e/utils/kubectl_test.go index dde8328da4..f051597bd4 100644 --- a/test/e2e/utils/kubectl_test.go +++ b/test/e2e/utils/kubectl_test.go @@ -17,7 +17,9 @@ limitations under the License. package utils import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/test/e2e/utils/suite_test.go b/test/e2e/utils/suite_test.go index fd80f3ac76..71e149df30 100644 --- a/test/e2e/utils/suite_test.go +++ b/test/e2e/utils/suite_test.go @@ -19,7 +19,9 @@ package utils import ( "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/test/e2e/utils/test_context.go b/test/e2e/utils/test_context.go index c2feb55c17..dfebaf84c1 100644 --- a/test/e2e/utils/test_context.go +++ b/test/e2e/utils/test_context.go @@ -27,7 +27,8 @@ import ( log "github.com/sirupsen/logrus" "sigs.k8s.io/kubebuilder/v3/pkg/plugin/util" - . "github.com/onsi/ginkgo/v2" //nolint:golint,revive + // nolint:revive + . "github.com/onsi/ginkgo/v2" ) const ( diff --git a/test/e2e/v4/e2e_suite_test.go b/test/e2e/v4/e2e_suite_test.go index 91f0e02636..14876eb4ef 100644 --- a/test/e2e/v4/e2e_suite_test.go +++ b/test/e2e/v4/e2e_suite_test.go @@ -23,7 +23,9 @@ import ( "sigs.k8s.io/kubebuilder/v3/pkg/plugin/util" "sigs.k8s.io/kubebuilder/v3/test/e2e/utils" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/test/e2e/v4/generate_test.go b/test/e2e/v4/generate_test.go index 11ccbff8a0..8afe83991f 100644 --- a/test/e2e/v4/generate_test.go +++ b/test/e2e/v4/generate_test.go @@ -21,15 +21,17 @@ import ( "path/filepath" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" pluginutil "sigs.k8s.io/kubebuilder/v3/pkg/plugin/util" //nolint:golint - //nolint:revive + // nolint:revive //nolint:golint - //nolint:revive + // nolint:revive "sigs.k8s.io/kubebuilder/v3/test/e2e/utils" ) diff --git a/test/e2e/v4/plugin_cluster_test.go b/test/e2e/v4/plugin_cluster_test.go index a757e793db..ee5d214854 100644 --- a/test/e2e/v4/plugin_cluster_test.go +++ b/test/e2e/v4/plugin_cluster_test.go @@ -28,12 +28,10 @@ import ( "sigs.k8s.io/kubebuilder/v3/pkg/plugin/util" - //nolint:golint - //nolint:revive + // nolint:revive . "github.com/onsi/ginkgo/v2" - //nolint:golint - //nolint:revive + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/v3/test/e2e/utils" diff --git a/testdata/project-v2/controllers/suite_test.go b/testdata/project-v2/controllers/suite_test.go index 6cfacce548..199e44e3dd 100644 --- a/testdata/project-v2/controllers/suite_test.go +++ b/testdata/project-v2/controllers/suite_test.go @@ -21,6 +21,8 @@ import ( "testing" . "github.com/onsi/ginkgo" + + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" "k8s.io/client-go/rest" diff --git a/testdata/project-v3/api/v1/webhook_suite_test.go b/testdata/project-v3/api/v1/webhook_suite_test.go index 456fa6a823..677d1a7aca 100644 --- a/testdata/project-v3/api/v1/webhook_suite_test.go +++ b/testdata/project-v3/api/v1/webhook_suite_test.go @@ -25,10 +25,12 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" - admissionv1beta1 "k8s.io/api/admission/v1beta1" + //+kubebuilder:scaffold:imports "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/testdata/project-v3/controllers/suite_test.go b/testdata/project-v3/controllers/suite_test.go index f9c01d744d..18b53958a6 100644 --- a/testdata/project-v3/controllers/suite_test.go +++ b/testdata/project-v3/controllers/suite_test.go @@ -20,7 +20,9 @@ import ( "path/filepath" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup-with-deploy-image/Makefile b/testdata/project-v4-multigroup-with-deploy-image/Makefile index b397beb0af..c78348a151 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/Makefile +++ b/testdata/project-v4-multigroup-with-deploy-image/Makefile @@ -161,7 +161,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION) KUSTOMIZE_VERSION ?= v5.3.0 CONTROLLER_TOOLS_VERSION ?= v0.14.0 ENVTEST_VERSION ?= release-0.17 -GOLANGCI_LINT_VERSION ?= v1.54.2 +GOLANGCI_LINT_VERSION ?= v1.57.2 .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. diff --git a/testdata/project-v4-multigroup-with-deploy-image/api/crew/v1/captain_webhook_test.go b/testdata/project-v4-multigroup-with-deploy-image/api/crew/v1/captain_webhook_test.go index 3b28658216..adb7e762c7 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/api/crew/v1/captain_webhook_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/api/crew/v1/captain_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-multigroup-with-deploy-image/api/crew/v1/webhook_suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/api/crew/v1/webhook_suite_test.go index 142ecea890..b99cede6ab 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/api/crew/v1/webhook_suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/api/crew/v1/webhook_suite_test.go @@ -26,10 +26,12 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" - admissionv1 "k8s.io/api/admission/v1" + //+kubebuilder:scaffold:imports apimachineryruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/testdata/project-v4-multigroup-with-deploy-image/api/ship/v1/destroyer_webhook_test.go b/testdata/project-v4-multigroup-with-deploy-image/api/ship/v1/destroyer_webhook_test.go index d9581869f0..02de0482ce 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/api/ship/v1/destroyer_webhook_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/api/ship/v1/destroyer_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-multigroup-with-deploy-image/api/ship/v1/webhook_suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/api/ship/v1/webhook_suite_test.go index 8d5a2293fb..ed8afbfbc1 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/api/ship/v1/webhook_suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/api/ship/v1/webhook_suite_test.go @@ -26,10 +26,12 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" - admissionv1 "k8s.io/api/admission/v1" + //+kubebuilder:scaffold:imports apimachineryruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/testdata/project-v4-multigroup-with-deploy-image/api/ship/v1beta1/frigate_webhook_test.go b/testdata/project-v4-multigroup-with-deploy-image/api/ship/v1beta1/frigate_webhook_test.go index 2fbb330994..8fdfb4e1ce 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/api/ship/v1beta1/frigate_webhook_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/api/ship/v1beta1/frigate_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1beta1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-multigroup-with-deploy-image/api/ship/v2alpha1/cruiser_webhook_test.go b/testdata/project-v4-multigroup-with-deploy-image/api/ship/v2alpha1/cruiser_webhook_test.go index 7678703b21..75d64c8710 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/api/ship/v2alpha1/cruiser_webhook_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/api/ship/v2alpha1/cruiser_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v2alpha1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-multigroup-with-deploy-image/api/ship/v2alpha1/webhook_suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/api/ship/v2alpha1/webhook_suite_test.go index 1b64559ad5..88029c6c53 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/api/ship/v2alpha1/webhook_suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/api/ship/v2alpha1/webhook_suite_test.go @@ -26,10 +26,12 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" - admissionv1 "k8s.io/api/admission/v1" + //+kubebuilder:scaffold:imports apimachineryruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/testdata/project-v4-multigroup-with-deploy-image/api/v1/lakers_webhook_test.go b/testdata/project-v4-multigroup-with-deploy-image/api/v1/lakers_webhook_test.go index 9f63f052c5..51203ecb9d 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/api/v1/lakers_webhook_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/api/v1/lakers_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-multigroup-with-deploy-image/api/v1/webhook_suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/api/v1/webhook_suite_test.go index 44b0f919c7..7fcaa56265 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/api/v1/webhook_suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/api/v1/webhook_suite_test.go @@ -26,10 +26,12 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" - admissionv1 "k8s.io/api/admission/v1" + //+kubebuilder:scaffold:imports apimachineryruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/apps/deployment_controller_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/apps/deployment_controller_test.go index 339a153202..612f758293 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/apps/deployment_controller_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/apps/deployment_controller_test.go @@ -17,6 +17,8 @@ limitations under the License. package apps import ( + + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/apps/suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/apps/suite_test.go index c6217718b6..449bd2b59b 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/apps/suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/apps/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/crew/captain_controller_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/crew/captain_controller_test.go index b2be385dd9..38e991abe6 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/crew/captain_controller_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/crew/captain_controller_test.go @@ -18,8 +18,9 @@ package crew import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/crew/suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/crew/suite_test.go index ca2d88fa29..79e2501c8d 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/crew/suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/crew/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/fiz/bar_controller_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/fiz/bar_controller_test.go index 2b9c388f1d..4cb878b623 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/fiz/bar_controller_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/fiz/bar_controller_test.go @@ -18,8 +18,9 @@ package fiz import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/fiz/suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/fiz/suite_test.go index 0df1c12e9f..8d16317baf 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/fiz/suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/fiz/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo.policy/healthcheckpolicy_controller_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo.policy/healthcheckpolicy_controller_test.go index 57b911e889..2db63d1025 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo.policy/healthcheckpolicy_controller_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo.policy/healthcheckpolicy_controller_test.go @@ -18,8 +18,9 @@ package foopolicy import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo.policy/suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo.policy/suite_test.go index 7c3c5b20fc..fb1328da5f 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo.policy/suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo.policy/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo/bar_controller_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo/bar_controller_test.go index c0bd76e8f2..1a70f09e8f 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo/bar_controller_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo/bar_controller_test.go @@ -18,8 +18,9 @@ package foo import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo/suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo/suite_test.go index 83b9fca5e8..7ccec701d7 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo/suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/foo/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/lakers_controller_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/lakers_controller_test.go index 55ddba24b0..ade4b31260 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/lakers_controller_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/lakers_controller_test.go @@ -18,8 +18,9 @@ package controller import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/sea-creatures/kraken_controller_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/sea-creatures/kraken_controller_test.go index 531252dca2..31ca7d7006 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/sea-creatures/kraken_controller_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/sea-creatures/kraken_controller_test.go @@ -18,8 +18,9 @@ package seacreatures import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/sea-creatures/leviathan_controller_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/sea-creatures/leviathan_controller_test.go index 9c0a6d79d8..b0741baba9 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/sea-creatures/leviathan_controller_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/sea-creatures/leviathan_controller_test.go @@ -18,8 +18,9 @@ package seacreatures import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/sea-creatures/suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/sea-creatures/suite_test.go index fe2dbcacaf..d9cef66eb5 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/sea-creatures/suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/sea-creatures/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/cruiser_controller_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/cruiser_controller_test.go index 6c008717e6..1cc538c1c8 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/cruiser_controller_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/cruiser_controller_test.go @@ -18,8 +18,9 @@ package ship import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/destroyer_controller_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/destroyer_controller_test.go index fff4e22fc6..ad075d96db 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/destroyer_controller_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/destroyer_controller_test.go @@ -18,8 +18,9 @@ package ship import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/frigate_controller_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/frigate_controller_test.go index d8597e0059..564b9cd49f 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/frigate_controller_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/frigate_controller_test.go @@ -18,8 +18,9 @@ package ship import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/suite_test.go index 0e8cc038ab..9bee0731b3 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/ship/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/suite_test.go index 101c80dbfe..4babb27ce9 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/internal/controller/suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/internal/controller/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup-with-deploy-image/test/e2e/e2e_suite_test.go b/testdata/project-v4-multigroup-with-deploy-image/test/e2e/e2e_suite_test.go index d55cd5da70..194bf856a5 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/test/e2e/e2e_suite_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/test/e2e/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/testdata/project-v4-multigroup-with-deploy-image/test/e2e/e2e_test.go b/testdata/project-v4-multigroup-with-deploy-image/test/e2e/e2e_test.go index 619c7651e0..f106f4726e 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/test/e2e/e2e_test.go +++ b/testdata/project-v4-multigroup-with-deploy-image/test/e2e/e2e_test.go @@ -21,7 +21,9 @@ import ( "os/exec" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/testdata/project-v4-multigroup-with-deploy-image/test/utils" diff --git a/testdata/project-v4-multigroup-with-deploy-image/test/utils/utils.go b/testdata/project-v4-multigroup-with-deploy-image/test/utils/utils.go index 31454d2fc4..6ad98ac115 100644 --- a/testdata/project-v4-multigroup-with-deploy-image/test/utils/utils.go +++ b/testdata/project-v4-multigroup-with-deploy-image/test/utils/utils.go @@ -22,6 +22,7 @@ import ( "os/exec" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" //nolint:golint,revive ) diff --git a/testdata/project-v4-multigroup/Makefile b/testdata/project-v4-multigroup/Makefile index b397beb0af..c78348a151 100644 --- a/testdata/project-v4-multigroup/Makefile +++ b/testdata/project-v4-multigroup/Makefile @@ -161,7 +161,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION) KUSTOMIZE_VERSION ?= v5.3.0 CONTROLLER_TOOLS_VERSION ?= v0.14.0 ENVTEST_VERSION ?= release-0.17 -GOLANGCI_LINT_VERSION ?= v1.54.2 +GOLANGCI_LINT_VERSION ?= v1.57.2 .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. diff --git a/testdata/project-v4-multigroup/api/crew/v1/captain_webhook_test.go b/testdata/project-v4-multigroup/api/crew/v1/captain_webhook_test.go index 3b28658216..adb7e762c7 100644 --- a/testdata/project-v4-multigroup/api/crew/v1/captain_webhook_test.go +++ b/testdata/project-v4-multigroup/api/crew/v1/captain_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-multigroup/api/crew/v1/webhook_suite_test.go b/testdata/project-v4-multigroup/api/crew/v1/webhook_suite_test.go index 142ecea890..b99cede6ab 100644 --- a/testdata/project-v4-multigroup/api/crew/v1/webhook_suite_test.go +++ b/testdata/project-v4-multigroup/api/crew/v1/webhook_suite_test.go @@ -26,10 +26,12 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" - admissionv1 "k8s.io/api/admission/v1" + //+kubebuilder:scaffold:imports apimachineryruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/testdata/project-v4-multigroup/api/ship/v1/destroyer_webhook_test.go b/testdata/project-v4-multigroup/api/ship/v1/destroyer_webhook_test.go index d9581869f0..02de0482ce 100644 --- a/testdata/project-v4-multigroup/api/ship/v1/destroyer_webhook_test.go +++ b/testdata/project-v4-multigroup/api/ship/v1/destroyer_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-multigroup/api/ship/v1/webhook_suite_test.go b/testdata/project-v4-multigroup/api/ship/v1/webhook_suite_test.go index 8d5a2293fb..ed8afbfbc1 100644 --- a/testdata/project-v4-multigroup/api/ship/v1/webhook_suite_test.go +++ b/testdata/project-v4-multigroup/api/ship/v1/webhook_suite_test.go @@ -26,10 +26,12 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" - admissionv1 "k8s.io/api/admission/v1" + //+kubebuilder:scaffold:imports apimachineryruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/testdata/project-v4-multigroup/api/ship/v1beta1/frigate_webhook_test.go b/testdata/project-v4-multigroup/api/ship/v1beta1/frigate_webhook_test.go index 2fbb330994..8fdfb4e1ce 100644 --- a/testdata/project-v4-multigroup/api/ship/v1beta1/frigate_webhook_test.go +++ b/testdata/project-v4-multigroup/api/ship/v1beta1/frigate_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1beta1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-multigroup/api/ship/v2alpha1/cruiser_webhook_test.go b/testdata/project-v4-multigroup/api/ship/v2alpha1/cruiser_webhook_test.go index 7678703b21..75d64c8710 100644 --- a/testdata/project-v4-multigroup/api/ship/v2alpha1/cruiser_webhook_test.go +++ b/testdata/project-v4-multigroup/api/ship/v2alpha1/cruiser_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v2alpha1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-multigroup/api/ship/v2alpha1/webhook_suite_test.go b/testdata/project-v4-multigroup/api/ship/v2alpha1/webhook_suite_test.go index 1b64559ad5..88029c6c53 100644 --- a/testdata/project-v4-multigroup/api/ship/v2alpha1/webhook_suite_test.go +++ b/testdata/project-v4-multigroup/api/ship/v2alpha1/webhook_suite_test.go @@ -26,10 +26,12 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" - admissionv1 "k8s.io/api/admission/v1" + //+kubebuilder:scaffold:imports apimachineryruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/testdata/project-v4-multigroup/api/v1/lakers_webhook_test.go b/testdata/project-v4-multigroup/api/v1/lakers_webhook_test.go index 9f63f052c5..51203ecb9d 100644 --- a/testdata/project-v4-multigroup/api/v1/lakers_webhook_test.go +++ b/testdata/project-v4-multigroup/api/v1/lakers_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-multigroup/api/v1/webhook_suite_test.go b/testdata/project-v4-multigroup/api/v1/webhook_suite_test.go index 44b0f919c7..7fcaa56265 100644 --- a/testdata/project-v4-multigroup/api/v1/webhook_suite_test.go +++ b/testdata/project-v4-multigroup/api/v1/webhook_suite_test.go @@ -26,10 +26,12 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" - admissionv1 "k8s.io/api/admission/v1" + //+kubebuilder:scaffold:imports apimachineryruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/testdata/project-v4-multigroup/internal/controller/apps/deployment_controller_test.go b/testdata/project-v4-multigroup/internal/controller/apps/deployment_controller_test.go index 339a153202..612f758293 100644 --- a/testdata/project-v4-multigroup/internal/controller/apps/deployment_controller_test.go +++ b/testdata/project-v4-multigroup/internal/controller/apps/deployment_controller_test.go @@ -17,6 +17,8 @@ limitations under the License. package apps import ( + + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-multigroup/internal/controller/apps/suite_test.go b/testdata/project-v4-multigroup/internal/controller/apps/suite_test.go index c6217718b6..449bd2b59b 100644 --- a/testdata/project-v4-multigroup/internal/controller/apps/suite_test.go +++ b/testdata/project-v4-multigroup/internal/controller/apps/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" diff --git a/testdata/project-v4-multigroup/internal/controller/crew/captain_controller_test.go b/testdata/project-v4-multigroup/internal/controller/crew/captain_controller_test.go index c2495aee47..f87f7246ac 100644 --- a/testdata/project-v4-multigroup/internal/controller/crew/captain_controller_test.go +++ b/testdata/project-v4-multigroup/internal/controller/crew/captain_controller_test.go @@ -18,8 +18,9 @@ package crew import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup/internal/controller/crew/suite_test.go b/testdata/project-v4-multigroup/internal/controller/crew/suite_test.go index 7d89a96d79..c47ec44c72 100644 --- a/testdata/project-v4-multigroup/internal/controller/crew/suite_test.go +++ b/testdata/project-v4-multigroup/internal/controller/crew/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup/internal/controller/fiz/bar_controller_test.go b/testdata/project-v4-multigroup/internal/controller/fiz/bar_controller_test.go index c9dca3f117..040477d357 100644 --- a/testdata/project-v4-multigroup/internal/controller/fiz/bar_controller_test.go +++ b/testdata/project-v4-multigroup/internal/controller/fiz/bar_controller_test.go @@ -18,8 +18,9 @@ package fiz import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup/internal/controller/fiz/suite_test.go b/testdata/project-v4-multigroup/internal/controller/fiz/suite_test.go index 9cb5154958..7e79654a9a 100644 --- a/testdata/project-v4-multigroup/internal/controller/fiz/suite_test.go +++ b/testdata/project-v4-multigroup/internal/controller/fiz/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup/internal/controller/foo.policy/healthcheckpolicy_controller_test.go b/testdata/project-v4-multigroup/internal/controller/foo.policy/healthcheckpolicy_controller_test.go index 55de998a0a..8c4e2c008e 100644 --- a/testdata/project-v4-multigroup/internal/controller/foo.policy/healthcheckpolicy_controller_test.go +++ b/testdata/project-v4-multigroup/internal/controller/foo.policy/healthcheckpolicy_controller_test.go @@ -18,8 +18,9 @@ package foopolicy import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup/internal/controller/foo.policy/suite_test.go b/testdata/project-v4-multigroup/internal/controller/foo.policy/suite_test.go index 82a1445c2d..6f739f9bd9 100644 --- a/testdata/project-v4-multigroup/internal/controller/foo.policy/suite_test.go +++ b/testdata/project-v4-multigroup/internal/controller/foo.policy/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup/internal/controller/foo/bar_controller_test.go b/testdata/project-v4-multigroup/internal/controller/foo/bar_controller_test.go index 12193854c7..8bbb716dd8 100644 --- a/testdata/project-v4-multigroup/internal/controller/foo/bar_controller_test.go +++ b/testdata/project-v4-multigroup/internal/controller/foo/bar_controller_test.go @@ -18,8 +18,9 @@ package foo import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup/internal/controller/foo/suite_test.go b/testdata/project-v4-multigroup/internal/controller/foo/suite_test.go index 0fe34ceec8..5146bcdfdd 100644 --- a/testdata/project-v4-multigroup/internal/controller/foo/suite_test.go +++ b/testdata/project-v4-multigroup/internal/controller/foo/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup/internal/controller/lakers_controller_test.go b/testdata/project-v4-multigroup/internal/controller/lakers_controller_test.go index 84ae3e086e..6d26f07518 100644 --- a/testdata/project-v4-multigroup/internal/controller/lakers_controller_test.go +++ b/testdata/project-v4-multigroup/internal/controller/lakers_controller_test.go @@ -18,8 +18,9 @@ package controller import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup/internal/controller/sea-creatures/kraken_controller_test.go b/testdata/project-v4-multigroup/internal/controller/sea-creatures/kraken_controller_test.go index b0eae061ff..22f4f21ff6 100644 --- a/testdata/project-v4-multigroup/internal/controller/sea-creatures/kraken_controller_test.go +++ b/testdata/project-v4-multigroup/internal/controller/sea-creatures/kraken_controller_test.go @@ -18,8 +18,9 @@ package seacreatures import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup/internal/controller/sea-creatures/leviathan_controller_test.go b/testdata/project-v4-multigroup/internal/controller/sea-creatures/leviathan_controller_test.go index 5b1e491aa8..47f58648f1 100644 --- a/testdata/project-v4-multigroup/internal/controller/sea-creatures/leviathan_controller_test.go +++ b/testdata/project-v4-multigroup/internal/controller/sea-creatures/leviathan_controller_test.go @@ -18,8 +18,9 @@ package seacreatures import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup/internal/controller/sea-creatures/suite_test.go b/testdata/project-v4-multigroup/internal/controller/sea-creatures/suite_test.go index 8e68c34098..4dc3da6bc0 100644 --- a/testdata/project-v4-multigroup/internal/controller/sea-creatures/suite_test.go +++ b/testdata/project-v4-multigroup/internal/controller/sea-creatures/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup/internal/controller/ship/cruiser_controller_test.go b/testdata/project-v4-multigroup/internal/controller/ship/cruiser_controller_test.go index 5d432ab735..30147dfe3a 100644 --- a/testdata/project-v4-multigroup/internal/controller/ship/cruiser_controller_test.go +++ b/testdata/project-v4-multigroup/internal/controller/ship/cruiser_controller_test.go @@ -18,8 +18,9 @@ package ship import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup/internal/controller/ship/destroyer_controller_test.go b/testdata/project-v4-multigroup/internal/controller/ship/destroyer_controller_test.go index c1de1afb8b..742b2569d8 100644 --- a/testdata/project-v4-multigroup/internal/controller/ship/destroyer_controller_test.go +++ b/testdata/project-v4-multigroup/internal/controller/ship/destroyer_controller_test.go @@ -18,8 +18,9 @@ package ship import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup/internal/controller/ship/frigate_controller_test.go b/testdata/project-v4-multigroup/internal/controller/ship/frigate_controller_test.go index f36a867975..d26cb67be7 100644 --- a/testdata/project-v4-multigroup/internal/controller/ship/frigate_controller_test.go +++ b/testdata/project-v4-multigroup/internal/controller/ship/frigate_controller_test.go @@ -18,8 +18,9 @@ package ship import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4-multigroup/internal/controller/ship/suite_test.go b/testdata/project-v4-multigroup/internal/controller/ship/suite_test.go index c2a7ac1128..95d12bcacf 100644 --- a/testdata/project-v4-multigroup/internal/controller/ship/suite_test.go +++ b/testdata/project-v4-multigroup/internal/controller/ship/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup/internal/controller/suite_test.go b/testdata/project-v4-multigroup/internal/controller/suite_test.go index 04793a59cf..06306851d7 100644 --- a/testdata/project-v4-multigroup/internal/controller/suite_test.go +++ b/testdata/project-v4-multigroup/internal/controller/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-multigroup/test/e2e/e2e_suite_test.go b/testdata/project-v4-multigroup/test/e2e/e2e_suite_test.go index a29453d76c..bcb143152c 100644 --- a/testdata/project-v4-multigroup/test/e2e/e2e_suite_test.go +++ b/testdata/project-v4-multigroup/test/e2e/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/testdata/project-v4-multigroup/test/e2e/e2e_test.go b/testdata/project-v4-multigroup/test/e2e/e2e_test.go index 3f427fde7b..678605dd4e 100644 --- a/testdata/project-v4-multigroup/test/e2e/e2e_test.go +++ b/testdata/project-v4-multigroup/test/e2e/e2e_test.go @@ -21,7 +21,9 @@ import ( "os/exec" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/testdata/project-v4-multigroup/test/utils" diff --git a/testdata/project-v4-multigroup/test/utils/utils.go b/testdata/project-v4-multigroup/test/utils/utils.go index 31454d2fc4..6ad98ac115 100644 --- a/testdata/project-v4-multigroup/test/utils/utils.go +++ b/testdata/project-v4-multigroup/test/utils/utils.go @@ -22,6 +22,7 @@ import ( "os/exec" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" //nolint:golint,revive ) diff --git a/testdata/project-v4-with-deploy-image/Makefile b/testdata/project-v4-with-deploy-image/Makefile index b397beb0af..c78348a151 100644 --- a/testdata/project-v4-with-deploy-image/Makefile +++ b/testdata/project-v4-with-deploy-image/Makefile @@ -161,7 +161,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION) KUSTOMIZE_VERSION ?= v5.3.0 CONTROLLER_TOOLS_VERSION ?= v0.14.0 ENVTEST_VERSION ?= release-0.17 -GOLANGCI_LINT_VERSION ?= v1.54.2 +GOLANGCI_LINT_VERSION ?= v1.57.2 .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. diff --git a/testdata/project-v4-with-deploy-image/api/v1alpha1/memcached_webhook_test.go b/testdata/project-v4-with-deploy-image/api/v1alpha1/memcached_webhook_test.go index 39c2ed2313..f6ec32a1a3 100644 --- a/testdata/project-v4-with-deploy-image/api/v1alpha1/memcached_webhook_test.go +++ b/testdata/project-v4-with-deploy-image/api/v1alpha1/memcached_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1alpha1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4-with-deploy-image/api/v1alpha1/webhook_suite_test.go b/testdata/project-v4-with-deploy-image/api/v1alpha1/webhook_suite_test.go index 16e8c41d33..d4149f958c 100644 --- a/testdata/project-v4-with-deploy-image/api/v1alpha1/webhook_suite_test.go +++ b/testdata/project-v4-with-deploy-image/api/v1alpha1/webhook_suite_test.go @@ -26,10 +26,12 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" - admissionv1 "k8s.io/api/admission/v1" + //+kubebuilder:scaffold:imports apimachineryruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/testdata/project-v4-with-deploy-image/internal/controller/busybox_controller_test.go b/testdata/project-v4-with-deploy-image/internal/controller/busybox_controller_test.go index f9b5d5ace5..45fe8eab91 100644 --- a/testdata/project-v4-with-deploy-image/internal/controller/busybox_controller_test.go +++ b/testdata/project-v4-with-deploy-image/internal/controller/busybox_controller_test.go @@ -23,7 +23,9 @@ import ( "time" //nolint:golint + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/testdata/project-v4-with-deploy-image/internal/controller/memcached_controller_test.go b/testdata/project-v4-with-deploy-image/internal/controller/memcached_controller_test.go index 76966e7344..d4845f4b9c 100644 --- a/testdata/project-v4-with-deploy-image/internal/controller/memcached_controller_test.go +++ b/testdata/project-v4-with-deploy-image/internal/controller/memcached_controller_test.go @@ -23,7 +23,9 @@ import ( "time" //nolint:golint + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" diff --git a/testdata/project-v4-with-deploy-image/internal/controller/suite_test.go b/testdata/project-v4-with-deploy-image/internal/controller/suite_test.go index 60e7fe0375..63ae03d9ac 100644 --- a/testdata/project-v4-with-deploy-image/internal/controller/suite_test.go +++ b/testdata/project-v4-with-deploy-image/internal/controller/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4-with-deploy-image/test/e2e/e2e_suite_test.go b/testdata/project-v4-with-deploy-image/test/e2e/e2e_suite_test.go index 8dab261170..f36e2b7d1d 100644 --- a/testdata/project-v4-with-deploy-image/test/e2e/e2e_suite_test.go +++ b/testdata/project-v4-with-deploy-image/test/e2e/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/testdata/project-v4-with-deploy-image/test/e2e/e2e_test.go b/testdata/project-v4-with-deploy-image/test/e2e/e2e_test.go index 8e53b23004..9e46baf14c 100644 --- a/testdata/project-v4-with-deploy-image/test/e2e/e2e_test.go +++ b/testdata/project-v4-with-deploy-image/test/e2e/e2e_test.go @@ -21,7 +21,9 @@ import ( "os/exec" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/testdata/project-v4-with-deploy-image/test/utils" diff --git a/testdata/project-v4-with-deploy-image/test/utils/utils.go b/testdata/project-v4-with-deploy-image/test/utils/utils.go index 31454d2fc4..6ad98ac115 100644 --- a/testdata/project-v4-with-deploy-image/test/utils/utils.go +++ b/testdata/project-v4-with-deploy-image/test/utils/utils.go @@ -22,6 +22,7 @@ import ( "os/exec" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" //nolint:golint,revive ) diff --git a/testdata/project-v4-with-grafana/Makefile b/testdata/project-v4-with-grafana/Makefile index b397beb0af..c78348a151 100644 --- a/testdata/project-v4-with-grafana/Makefile +++ b/testdata/project-v4-with-grafana/Makefile @@ -161,7 +161,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION) KUSTOMIZE_VERSION ?= v5.3.0 CONTROLLER_TOOLS_VERSION ?= v0.14.0 ENVTEST_VERSION ?= release-0.17 -GOLANGCI_LINT_VERSION ?= v1.54.2 +GOLANGCI_LINT_VERSION ?= v1.57.2 .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. diff --git a/testdata/project-v4-with-grafana/test/e2e/e2e_suite_test.go b/testdata/project-v4-with-grafana/test/e2e/e2e_suite_test.go index f3f265474a..a7adc5a436 100644 --- a/testdata/project-v4-with-grafana/test/e2e/e2e_suite_test.go +++ b/testdata/project-v4-with-grafana/test/e2e/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/testdata/project-v4-with-grafana/test/e2e/e2e_test.go b/testdata/project-v4-with-grafana/test/e2e/e2e_test.go index 18448c90e1..39f1649287 100644 --- a/testdata/project-v4-with-grafana/test/e2e/e2e_test.go +++ b/testdata/project-v4-with-grafana/test/e2e/e2e_test.go @@ -21,7 +21,9 @@ import ( "os/exec" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/testdata/project-v4-with-grafana/test/utils" diff --git a/testdata/project-v4-with-grafana/test/utils/utils.go b/testdata/project-v4-with-grafana/test/utils/utils.go index 31454d2fc4..6ad98ac115 100644 --- a/testdata/project-v4-with-grafana/test/utils/utils.go +++ b/testdata/project-v4-with-grafana/test/utils/utils.go @@ -22,6 +22,7 @@ import ( "os/exec" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" //nolint:golint,revive ) diff --git a/testdata/project-v4/Makefile b/testdata/project-v4/Makefile index b397beb0af..c78348a151 100644 --- a/testdata/project-v4/Makefile +++ b/testdata/project-v4/Makefile @@ -161,7 +161,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION) KUSTOMIZE_VERSION ?= v5.3.0 CONTROLLER_TOOLS_VERSION ?= v0.14.0 ENVTEST_VERSION ?= release-0.17 -GOLANGCI_LINT_VERSION ?= v1.54.2 +GOLANGCI_LINT_VERSION ?= v1.57.2 .PHONY: kustomize kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. diff --git a/testdata/project-v4/api/v1/admiral_webhook_test.go b/testdata/project-v4/api/v1/admiral_webhook_test.go index a93b75f5b6..5deb59ba5d 100644 --- a/testdata/project-v4/api/v1/admiral_webhook_test.go +++ b/testdata/project-v4/api/v1/admiral_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4/api/v1/captain_webhook_test.go b/testdata/project-v4/api/v1/captain_webhook_test.go index 3b28658216..adb7e762c7 100644 --- a/testdata/project-v4/api/v1/captain_webhook_test.go +++ b/testdata/project-v4/api/v1/captain_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4/api/v1/firstmate_webhook_test.go b/testdata/project-v4/api/v1/firstmate_webhook_test.go index 59e92841cc..488d12a298 100644 --- a/testdata/project-v4/api/v1/firstmate_webhook_test.go +++ b/testdata/project-v4/api/v1/firstmate_webhook_test.go @@ -17,6 +17,7 @@ limitations under the License. package v1 import ( + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4/api/v1/webhook_suite_test.go b/testdata/project-v4/api/v1/webhook_suite_test.go index 4d2a0cbe6e..344da4fc5d 100644 --- a/testdata/project-v4/api/v1/webhook_suite_test.go +++ b/testdata/project-v4/api/v1/webhook_suite_test.go @@ -26,10 +26,12 @@ import ( "testing" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" - admissionv1 "k8s.io/api/admission/v1" + //+kubebuilder:scaffold:imports apimachineryruntime "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/testdata/project-v4/internal/controller/admiral_controller_test.go b/testdata/project-v4/internal/controller/admiral_controller_test.go index c807fe051f..ca9927f90e 100644 --- a/testdata/project-v4/internal/controller/admiral_controller_test.go +++ b/testdata/project-v4/internal/controller/admiral_controller_test.go @@ -18,8 +18,9 @@ package controller import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4/internal/controller/captain_controller_test.go b/testdata/project-v4/internal/controller/captain_controller_test.go index 6c03fbf272..5da933c6bb 100644 --- a/testdata/project-v4/internal/controller/captain_controller_test.go +++ b/testdata/project-v4/internal/controller/captain_controller_test.go @@ -18,8 +18,9 @@ package controller import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4/internal/controller/firstmate_controller_test.go b/testdata/project-v4/internal/controller/firstmate_controller_test.go index e5bc966641..9aea8da5e8 100644 --- a/testdata/project-v4/internal/controller/firstmate_controller_test.go +++ b/testdata/project-v4/internal/controller/firstmate_controller_test.go @@ -18,8 +18,9 @@ package controller import ( "context" - + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/types" diff --git a/testdata/project-v4/internal/controller/laker_controller_test.go b/testdata/project-v4/internal/controller/laker_controller_test.go index dad17ef9eb..591d7f287d 100644 --- a/testdata/project-v4/internal/controller/laker_controller_test.go +++ b/testdata/project-v4/internal/controller/laker_controller_test.go @@ -17,6 +17,8 @@ limitations under the License. package controller import ( + + // nolint:revive . "github.com/onsi/ginkgo/v2" ) diff --git a/testdata/project-v4/internal/controller/suite_test.go b/testdata/project-v4/internal/controller/suite_test.go index 59fbfbe101..002bd7f254 100644 --- a/testdata/project-v4/internal/controller/suite_test.go +++ b/testdata/project-v4/internal/controller/suite_test.go @@ -22,7 +22,9 @@ import ( "runtime" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "k8s.io/client-go/kubernetes/scheme" diff --git a/testdata/project-v4/test/e2e/e2e_suite_test.go b/testdata/project-v4/test/e2e/e2e_suite_test.go index e639b2ff56..9685a4aa7c 100644 --- a/testdata/project-v4/test/e2e/e2e_suite_test.go +++ b/testdata/project-v4/test/e2e/e2e_suite_test.go @@ -20,7 +20,9 @@ import ( "fmt" "testing" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" ) diff --git a/testdata/project-v4/test/e2e/e2e_test.go b/testdata/project-v4/test/e2e/e2e_test.go index 5dfdb827a2..1556c30524 100644 --- a/testdata/project-v4/test/e2e/e2e_test.go +++ b/testdata/project-v4/test/e2e/e2e_test.go @@ -21,7 +21,9 @@ import ( "os/exec" "time" + // nolint:revive . "github.com/onsi/ginkgo/v2" + // nolint:revive . "github.com/onsi/gomega" "sigs.k8s.io/kubebuilder/testdata/project-v4/test/utils" diff --git a/testdata/project-v4/test/utils/utils.go b/testdata/project-v4/test/utils/utils.go index 31454d2fc4..6ad98ac115 100644 --- a/testdata/project-v4/test/utils/utils.go +++ b/testdata/project-v4/test/utils/utils.go @@ -22,6 +22,7 @@ import ( "os/exec" "strings" + // nolint:revive . "github.com/onsi/ginkgo/v2" //nolint:golint,revive )