From a7f6e03536b83ec6bec0d8799fc531cb92af14cf Mon Sep 17 00:00:00 2001 From: Camila Macedo <7708031+camilamacedo86@users.noreply.github.com> Date: Sat, 6 Apr 2024 05:18:04 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20=20Upgrade=20golangci=20from=201.54?= =?UTF-8?q?=20to=201.57=20(#3846)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Upgrade golangci from 1.54 to 1.57 * Fix lint issues after upgrade by: a) Ensure that in all places we are ignoring the exception equally ```go // nolint:revive . "github.com/onsi/ginkgo/v2" // nolint:revive . "github.com/onsi/gomega" ``` b) Ensure that we use `_` for args not explicit called in the funcs. Example ```go PreRunE: func(_ *cobra.Command, _ []string) error { ``` --- .github/workflows/lint-sample.yml | 4 ++-- .github/workflows/lint.yml | 2 +- Makefile | 2 +- .../component-config-tutorial/testdata/project/Makefile | 2 +- .../testdata/project/test/e2e/e2e_suite_test.go | 2 ++ .../testdata/project/test/e2e/e2e_test.go | 2 ++ .../testdata/project/test/utils/utils.go | 1 + docs/book/src/cronjob-tutorial/testdata/project/Makefile | 2 +- .../testdata/project/api/v1/cronjob_webhook_test.go | 1 + .../testdata/project/api/v1/webhook_suite_test.go | 4 +++- .../internal/controller/cronjob_controller_test.go | 2 ++ .../testdata/project/internal/controller/suite_test.go | 2 ++ .../testdata/project/test/e2e/e2e_suite_test.go | 2 ++ .../testdata/project/test/e2e/e2e_test.go | 2 ++ .../cronjob-tutorial/testdata/project/test/utils/utils.go | 1 + docs/book/src/getting-started/testdata/project/Makefile | 2 +- .../internal/controller/memcached_controller_test.go | 2 ++ .../testdata/project/internal/controller/suite_test.go | 2 ++ .../testdata/project/test/e2e/e2e_suite_test.go | 2 ++ .../getting-started/testdata/project/test/e2e/e2e_test.go | 2 ++ .../getting-started/testdata/project/test/utils/utils.go | 1 + .../testdata/project/api/v1/cronjob_webhook_test.go | 1 + .../testdata/project/api/v1/webhook_suite_test.go | 2 ++ .../testdata/project/api/v2/webhook_suite_test.go | 2 ++ .../testdata/project/internal/controller/suite_test.go | 2 ++ .../testdata/project/test/e2e/e2e_suite_test.go | 2 ++ .../testdata/project/test/e2e/e2e_test.go | 2 ++ .../testdata/project/test/utils/utils.go | 1 + .../internal/cronjob-tutorial/writing_tests_controller.go | 2 ++ pkg/cli/alpha/generate.go | 4 ++-- pkg/cli/cli_test.go | 2 ++ pkg/cli/completion.go | 8 ++++---- pkg/cli/completion_test.go | 2 ++ pkg/cli/init.go | 2 +- pkg/cli/options_test.go | 6 ++++-- pkg/cli/resource_test.go | 2 ++ pkg/cli/root.go | 2 +- pkg/cli/suite_test.go | 2 ++ pkg/cli/version_test.go | 2 ++ pkg/config/errors_test.go | 2 ++ pkg/config/registry_test.go | 2 ++ pkg/config/store/errors_test.go | 2 ++ pkg/config/store/yaml/store_test.go | 2 ++ pkg/config/suite_test.go | 2 ++ pkg/config/v2/config_test.go | 2 ++ pkg/config/v3/config_test.go | 2 ++ pkg/config/version_test.go | 2 ++ pkg/internal/validation/dns_test.go | 2 ++ pkg/machinery/errors_test.go | 2 ++ pkg/machinery/funcmap_test.go | 2 ++ pkg/machinery/injector_test.go | 2 ++ pkg/machinery/machinery_suite_test.go | 2 ++ pkg/machinery/marker_test.go | 2 ++ pkg/machinery/mixins_test.go | 2 ++ pkg/machinery/scaffold_test.go | 2 ++ pkg/model/resource/api_test.go | 2 ++ pkg/model/resource/gvk_test.go | 2 ++ pkg/model/resource/resource_test.go | 2 ++ pkg/model/resource/suite_test.go | 2 ++ pkg/model/resource/utils_test.go | 2 ++ pkg/model/resource/webhooks_test.go | 2 ++ pkg/model/stage/stage_test.go | 1 + pkg/plugin/bundle_test.go | 2 ++ pkg/plugin/errors_test.go | 2 ++ pkg/plugin/filter_test.go | 2 ++ pkg/plugin/helpers_test.go | 2 ++ pkg/plugin/suite_test.go | 2 ++ pkg/plugin/util/exec_test.go | 2 ++ pkg/plugin/util/helpers_test.go | 2 ++ pkg/plugin/util/util_test.go | 2 ++ pkg/plugin/version_test.go | 2 ++ pkg/plugins/external/external_test.go | 2 ++ .../internal/templates/controllers/controller-test.go | 2 ++ pkg/plugins/golang/go_version_test.go | 2 ++ pkg/plugins/golang/options_test.go | 2 ++ pkg/plugins/golang/suite_test.go | 2 ++ .../templates/controllers/controller_suitetest.go | 1 + .../scaffolds/internal/templates/api/webhook_suitetest.go | 2 ++ .../templates/controllers/controller_suitetest.go | 2 ++ .../scaffolds/internal/templates/api/webhook_suitetest.go | 2 ++ .../internal/templates/api/webhook_test_template.go | 1 + .../templates/controllers/controller_suitetest.go | 2 ++ .../templates/controllers/controller_test_template.go | 2 ++ .../golang/v4/scaffolds/internal/templates/makefile.go | 2 +- .../v4/scaffolds/internal/templates/test/e2e/suite.go | 2 ++ .../v4/scaffolds/internal/templates/test/e2e/test.go | 2 ++ .../v4/scaffolds/internal/templates/test/utils/utils.go | 1 + test/e2e/alphagenerate/e2e_suite_test.go | 2 ++ test/e2e/alphagenerate/generate_test.go | 2 ++ test/e2e/deployimage/e2e_suite_test.go | 2 ++ test/e2e/deployimage/plugin_cluster_test.go | 7 ++----- test/e2e/externalplugin/e2e_suite_test.go | 2 ++ test/e2e/externalplugin/generate_test.go | 8 ++++---- test/e2e/grafana/e2e_suite_test.go | 2 ++ test/e2e/grafana/generate_test.go | 6 ++---- test/e2e/utils/kubectl_test.go | 2 ++ test/e2e/utils/suite_test.go | 2 ++ test/e2e/utils/test_context.go | 3 ++- test/e2e/v4/e2e_suite_test.go | 2 ++ test/e2e/v4/generate_test.go | 6 ++++-- test/e2e/v4/plugin_cluster_test.go | 6 ++---- testdata/project-v2/controllers/suite_test.go | 2 ++ testdata/project-v3/api/v1/webhook_suite_test.go | 4 +++- testdata/project-v3/controllers/suite_test.go | 2 ++ testdata/project-v4-multigroup-with-deploy-image/Makefile | 2 +- .../api/crew/v1/captain_webhook_test.go | 1 + .../api/crew/v1/webhook_suite_test.go | 4 +++- .../api/ship/v1/destroyer_webhook_test.go | 1 + .../api/ship/v1/webhook_suite_test.go | 4 +++- .../api/ship/v1beta1/frigate_webhook_test.go | 1 + .../api/ship/v2alpha1/cruiser_webhook_test.go | 1 + .../api/ship/v2alpha1/webhook_suite_test.go | 4 +++- .../api/v1/lakers_webhook_test.go | 1 + .../api/v1/webhook_suite_test.go | 4 +++- .../controller/apps/deployment_controller_test.go | 2 ++ .../internal/controller/apps/suite_test.go | 2 ++ .../internal/controller/crew/captain_controller_test.go | 3 ++- .../internal/controller/crew/suite_test.go | 2 ++ .../internal/controller/fiz/bar_controller_test.go | 3 ++- .../internal/controller/fiz/suite_test.go | 2 ++ .../foo.policy/healthcheckpolicy_controller_test.go | 3 ++- .../internal/controller/foo.policy/suite_test.go | 2 ++ .../internal/controller/foo/bar_controller_test.go | 3 ++- .../internal/controller/foo/suite_test.go | 2 ++ .../internal/controller/lakers_controller_test.go | 3 ++- .../controller/sea-creatures/kraken_controller_test.go | 3 ++- .../controller/sea-creatures/leviathan_controller_test.go | 3 ++- .../internal/controller/sea-creatures/suite_test.go | 2 ++ .../internal/controller/ship/cruiser_controller_test.go | 3 ++- .../internal/controller/ship/destroyer_controller_test.go | 3 ++- .../internal/controller/ship/frigate_controller_test.go | 3 ++- .../internal/controller/ship/suite_test.go | 2 ++ .../internal/controller/suite_test.go | 2 ++ .../test/e2e/e2e_suite_test.go | 2 ++ .../test/e2e/e2e_test.go | 2 ++ .../test/utils/utils.go | 1 + testdata/project-v4-multigroup/Makefile | 2 +- .../api/crew/v1/captain_webhook_test.go | 1 + .../api/crew/v1/webhook_suite_test.go | 4 +++- .../api/ship/v1/destroyer_webhook_test.go | 1 + .../api/ship/v1/webhook_suite_test.go | 4 +++- .../api/ship/v1beta1/frigate_webhook_test.go | 1 + .../api/ship/v2alpha1/cruiser_webhook_test.go | 1 + .../api/ship/v2alpha1/webhook_suite_test.go | 4 +++- .../project-v4-multigroup/api/v1/lakers_webhook_test.go | 1 + .../project-v4-multigroup/api/v1/webhook_suite_test.go | 4 +++- .../controller/apps/deployment_controller_test.go | 2 ++ .../internal/controller/apps/suite_test.go | 2 ++ .../internal/controller/crew/captain_controller_test.go | 3 ++- .../internal/controller/crew/suite_test.go | 2 ++ .../internal/controller/fiz/bar_controller_test.go | 3 ++- .../internal/controller/fiz/suite_test.go | 2 ++ .../foo.policy/healthcheckpolicy_controller_test.go | 3 ++- .../internal/controller/foo.policy/suite_test.go | 2 ++ .../internal/controller/foo/bar_controller_test.go | 3 ++- .../internal/controller/foo/suite_test.go | 2 ++ .../internal/controller/lakers_controller_test.go | 3 ++- .../controller/sea-creatures/kraken_controller_test.go | 3 ++- .../controller/sea-creatures/leviathan_controller_test.go | 3 ++- .../internal/controller/sea-creatures/suite_test.go | 2 ++ .../internal/controller/ship/cruiser_controller_test.go | 3 ++- .../internal/controller/ship/destroyer_controller_test.go | 3 ++- .../internal/controller/ship/frigate_controller_test.go | 3 ++- .../internal/controller/ship/suite_test.go | 2 ++ .../internal/controller/suite_test.go | 2 ++ testdata/project-v4-multigroup/test/e2e/e2e_suite_test.go | 2 ++ testdata/project-v4-multigroup/test/e2e/e2e_test.go | 2 ++ testdata/project-v4-multigroup/test/utils/utils.go | 1 + testdata/project-v4-with-deploy-image/Makefile | 2 +- .../api/v1alpha1/memcached_webhook_test.go | 1 + .../api/v1alpha1/webhook_suite_test.go | 4 +++- .../internal/controller/busybox_controller_test.go | 2 ++ .../internal/controller/memcached_controller_test.go | 2 ++ .../internal/controller/suite_test.go | 2 ++ .../test/e2e/e2e_suite_test.go | 2 ++ .../project-v4-with-deploy-image/test/e2e/e2e_test.go | 2 ++ testdata/project-v4-with-deploy-image/test/utils/utils.go | 1 + testdata/project-v4-with-grafana/Makefile | 2 +- .../project-v4-with-grafana/test/e2e/e2e_suite_test.go | 2 ++ testdata/project-v4-with-grafana/test/e2e/e2e_test.go | 2 ++ testdata/project-v4-with-grafana/test/utils/utils.go | 1 + testdata/project-v4/Makefile | 2 +- testdata/project-v4/api/v1/admiral_webhook_test.go | 1 + testdata/project-v4/api/v1/captain_webhook_test.go | 1 + testdata/project-v4/api/v1/firstmate_webhook_test.go | 1 + testdata/project-v4/api/v1/webhook_suite_test.go | 4 +++- .../internal/controller/admiral_controller_test.go | 3 ++- .../internal/controller/captain_controller_test.go | 3 ++- .../internal/controller/firstmate_controller_test.go | 3 ++- .../internal/controller/laker_controller_test.go | 2 ++ testdata/project-v4/internal/controller/suite_test.go | 2 ++ testdata/project-v4/test/e2e/e2e_suite_test.go | 2 ++ testdata/project-v4/test/e2e/e2e_test.go | 2 ++ testdata/project-v4/test/utils/utils.go | 1 + 194 files changed, 366 insertions(+), 78 deletions(-) diff --git a/.github/workflows/lint-sample.yml b/.github/workflows/lint-sample.yml index fa51c7f66ce..fdb4d9f5fab 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 be72f8a71f5..20f21e8a6d7 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 e61ad169afb..054060cce64 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 b397beb0af6..c78348a151f 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 a2d85acad7b..6b2671bd50c 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 1193e5f1532..171480b4356 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 31454d2fc4a..6ad98ac1159 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 b397beb0af6..c78348a151f 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 4584d9b0cf1..47913d5e449 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 fb1864f8cbf..403d656e9e5 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 9b95c3d362d..2497d047831 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 1b5f665a1af..1f18ebbdd2f 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 a2d85acad7b..6b2671bd50c 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 1193e5f1532..171480b4356 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 31454d2fc4a..6ad98ac1159 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 b397beb0af6..c78348a151f 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 66b20cf0d57..ae5935e6a5b 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 baccfcfac33..a7e2663fa07 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 a2d85acad7b..6b2671bd50c 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 c6b17a62f5e..648efab6907 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 31454d2fc4a..6ad98ac1159 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 6ef09d64607..95dfcbcc08f 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 fb1864f8cbf..7fb5b99209d 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 63eda985753..388893b8458 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 36b040b6c31..b9a79e89ec1 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 a2d85acad7b..6b2671bd50c 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 1193e5f1532..171480b4356 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 0c91bc93d22..449e0ec50ac 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 01b8998d6ba..d5592f153e6 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 4f4f292e1dc..d35a4219b1a 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 ae5f8c7023f..17897226429 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 162eb7c072e..41029d1a012 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 ab235b4b0f3..7a756368a9b 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 f52e3e5f429..38837e5441c 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 ee6f70b9a55..591494e7f3c 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 817da08173d..0a57a4c3f40 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 7ee54e17682..591babb6f78 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 fa7289dec42..594817285ce 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 e8f54b0fcd4..d072df4bd91 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 e77faaf1f07..57947bccae2 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 11e9ea408cc..00f3871e30e 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 ef62a6efe93..96b3afc489e 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 d4afb6dad8d..aa1b8464478 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 697d58bf81e..2e9110f6029 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 57d65a6b4fc..d9cf965a50d 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 fc08295597d..e3cc7859534 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 0fcaad14a60..d2f61d0bd2e 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 b3ec7925bc7..74e6602f8df 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 67f1bc1ebc0..9f8e925ccb1 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 375b63d86a3..52fd67d214b 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 c9c2b76e6e0..c834f76d40a 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 8d246b82924..0cfef87dd0e 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 27a58656e0e..0d506350dbd 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 df43f3a5c03..a5af0f0b466 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 6cf14ddebdf..192e2af2ea3 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 fbce493e50a..21b2cc062ff 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 8b93bef4dd6..cb9ae82d638 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 5935d02e2f9..5b104db36e2 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 bd240d657a9..2ec6ab86848 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 9e1451a3217..b9b742ca06e 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 4b0d6bd9132..8c0973b05ba 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 7368e224ebb..e07f169742e 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 ccb1a41d574..2c225ffad81 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 aeea88e281b..4dd46e8478e 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 626de977736..464ed0bddd7 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 f01caa25052..c26fd4f27aa 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 0938ede0fac..1e0440640b0 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 58d449852ca..81cf554f96c 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 62553b9ce9e..69f28991704 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 e502934a606..fbbb884e20c 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 771c7660345..71d5ce54949 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 8941a2b19c1..9904eb64c6c 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 a0e2ca1f45c..860f4b81e4c 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 f67e40728f9..70dc3d5971b 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 19301100937..7e20a20fb74 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 c38994dd3ce..33edd2d4638 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 d8a0b975050..1b96aa0efbb 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 c246cddffb4..6cb1300c3eb 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 5daa897ee6e..4b49cbaf7eb 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 e8e396deb16..b5f241c4ab1 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 9a23081f9e9..fb3111b25b0 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 bffe718186f..39e80c5c6bb 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 abe04cffb8b..b250efbc632 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 f61feef7655..f041315e048 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 14666e681e7..98471fb365a 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 66f93be8259..a2e09f130f7 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 b19f0862189..2c744ee4a88 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 eab37e6dac4..2a120f4fd55 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 5745cdad17b..1943fe4afad 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 cff1a3de4e7..c141e10ee48 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 66c3fac1b45..9ac795c2542 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 5c299900035..a20c319f642 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 cdd39333638..51729501683 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 c26db06bb01..e46efacdb27 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 d32d4eb8360..22de1e4f2f9 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 dde8328da48..f051597bd4e 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 fd80f3ac760..71e149df30e 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 c2feb55c170..dfebaf84c14 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 91f0e026361..14876eb4ef7 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 11ccbff8a00..8afe83991f7 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 a757e793dbc..ee5d214854c 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 6cfacce548b..199e44e3dd4 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 456fa6a823a..677d1a7acae 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 f9c01d744da..18b53958a60 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 b397beb0af6..c78348a151f 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 3b286582166..adb7e762c72 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 142ecea890c..b99cede6ab8 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 d9581869f03..02de0482cea 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 8d5a2293fbf..ed8afbfbc1e 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 2fbb330994a..8fdfb4e1cee 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 7678703b212..75d64c87103 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 1b64559ad50..88029c6c530 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 9f63f052c50..51203ecb9d1 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 44b0f919c70..7fcaa562654 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 339a1532026..612f7582936 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 c6217718b62..449bd2b59bf 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 b2be385dd91..38e991abe63 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 ca2d88fa291..79e2501c8d8 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 2b9c388f1d5..4cb878b6233 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 0df1c12e9fe..8d16317baf2 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 57b911e8893..2db63d1025d 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 7c3c5b20fcb..fb1328da5f6 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 c0bd76e8f26..1a70f09e8f8 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 83b9fca5e82..7ccec701d73 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 55ddba24b09..ade4b312605 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 531252dca2b..31ca7d70067 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 9c0a6d79d87..b0741baba9a 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 fe2dbcacaf8..d9cef66eb54 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 6c008717e68..1cc538c1c83 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 fff4e22fc60..ad075d96dbe 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 d8597e00598..564b9cd49fd 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 0e8cc038ab7..9bee0731b36 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 101c80dbfe5..4babb27ce91 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 d55cd5da70d..194bf856a53 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 619c7651e00..f106f4726e8 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 31454d2fc4a..6ad98ac1159 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 b397beb0af6..c78348a151f 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 3b286582166..adb7e762c72 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 142ecea890c..b99cede6ab8 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 d9581869f03..02de0482cea 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 8d5a2293fbf..ed8afbfbc1e 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 2fbb330994a..8fdfb4e1cee 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 7678703b212..75d64c87103 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 1b64559ad50..88029c6c530 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 9f63f052c50..51203ecb9d1 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 44b0f919c70..7fcaa562654 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 339a1532026..612f7582936 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 c6217718b62..449bd2b59bf 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 c2495aee47c..f87f7246ac2 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 7d89a96d792..c47ec44c72d 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 c9dca3f1172..040477d357f 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 9cb51549582..7e79654a9a7 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 55de998a0a2..8c4e2c008e5 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 82a1445c2dc..6f739f9bd94 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 12193854c79..8bbb716dd8d 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 0fe34ceec85..5146bcdfddf 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 84ae3e086e0..6d26f075185 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 b0eae061ff8..22f4f21ff6f 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 5b1e491aa89..47f58648f18 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 8e68c34098f..4dc3da6bc0f 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 5d432ab735e..30147dfe3a3 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 c1de1afb8b6..742b2569d8d 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 f36a8679754..d26cb67be7f 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 c2a7ac1128c..95d12bcacfa 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 04793a59cff..06306851d77 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 a29453d76cd..bcb143152c2 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 3f427fde7b4..678605dd4ed 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 31454d2fc4a..6ad98ac1159 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 b397beb0af6..c78348a151f 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 39c2ed23133..f6ec32a1a3d 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 16e8c41d338..d4149f958cb 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 f9b5d5ace5c..45fe8eab917 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 76966e7344f..d4845f4b9ca 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 60e7fe03756..63ae03d9ac0 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 8dab261170b..f36e2b7d1d6 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 8e53b230045..9e46baf14cd 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 31454d2fc4a..6ad98ac1159 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 b397beb0af6..c78348a151f 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 f3f265474a5..a7adc5a4362 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 18448c90e19..39f1649287e 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 31454d2fc4a..6ad98ac1159 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 b397beb0af6..c78348a151f 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 a93b75f5b66..5deb59ba5df 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 3b286582166..adb7e762c72 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 59e92841cc1..488d12a2989 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 4d2a0cbe6ec..344da4fc5d8 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 c807fe051f9..ca9927f90e6 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 6c03fbf272e..5da933c6bbf 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 e5bc9666411..9aea8da5e8b 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 dad17ef9eb5..591d7f287d3 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 59fbfbe101d..002bd7f254f 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 e639b2ff564..9685a4aa7c5 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 5dfdb827a21..1556c305242 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 31454d2fc4a..6ad98ac1159 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 )