diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b2686e2..c0e7850a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0 with: - version: v1.54.2 + version: v1.55.2 shellcheck: name: Shellcheck diff --git a/Makefile b/Makefile index 1fb79240..d28c5905 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ SETUP_ENVTEST_VER := v0.0.0-20211110210527-619e6b92dab9 SETUP_ENVTEST_BIN := setup-envtest SETUP_ENVTEST := $(abspath $(BIN_DIR)/$(SETUP_ENVTEST_BIN)) -GOLANGCI_LINT_VER := v1.54.2 +GOLANGCI_LINT_VER := v1.55.2 GOLANGCI_LINT_BIN := golangci-lint GOLANGCI_LINT := $(BIN_DIR)/$(GOLANGCI_LINT_BIN) diff --git a/controllers/admissionpolicy_controller_test.go b/controllers/admissionpolicy_controller_test.go index 80df5471..649139c0 100644 --- a/controllers/admissionpolicy_controller_test.go +++ b/controllers/admissionpolicy_controller_test.go @@ -21,8 +21,8 @@ import ( "time" policiesv1 "github.com/kubewarden/kubewarden-controller/pkg/apis/policies/v1" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" + . "github.com/onsi/ginkgo/v2" //nolint:revive + . "github.com/onsi/gomega" //nolint:revive ) var _ = Describe("Given an AdmissionPolicy", func() { diff --git a/controllers/clusteradmissionpolicy_controller_test.go b/controllers/clusteradmissionpolicy_controller_test.go index f66bbdaf..1fdca5ab 100644 --- a/controllers/clusteradmissionpolicy_controller_test.go +++ b/controllers/clusteradmissionpolicy_controller_test.go @@ -21,8 +21,8 @@ import ( "time" policiesv1 "github.com/kubewarden/kubewarden-controller/pkg/apis/policies/v1" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" + . "github.com/onsi/ginkgo/v2" //nolint:revive + . "github.com/onsi/gomega" //nolint:revive ) var _ = Describe("Given a ClusterAdmissionPolicy", func() { diff --git a/controllers/policyserver_controller_test.go b/controllers/policyserver_controller_test.go index f77cfef4..432163e4 100644 --- a/controllers/policyserver_controller_test.go +++ b/controllers/policyserver_controller_test.go @@ -21,8 +21,8 @@ import ( "time" policiesv1 "github.com/kubewarden/kubewarden-controller/pkg/apis/policies/v1" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" + . "github.com/onsi/ginkgo/v2" //nolint:revive + . "github.com/onsi/gomega" //nolint:revive metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/kubewarden/kubewarden-controller/internal/pkg/constants" diff --git a/controllers/suite_test.go b/controllers/suite_test.go index 78d540e7..b8cc58f2 100644 --- a/controllers/suite_test.go +++ b/controllers/suite_test.go @@ -23,8 +23,8 @@ import ( "testing" policiesv1 "github.com/kubewarden/kubewarden-controller/pkg/apis/policies/v1" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" + . "github.com/onsi/ginkgo/v2" //nolint:revive + . "github.com/onsi/gomega" //nolint:revive corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes/scheme" diff --git a/controllers/utils_test.go b/controllers/utils_test.go index 806cda9b..5df639c6 100644 --- a/controllers/utils_test.go +++ b/controllers/utils_test.go @@ -22,7 +22,7 @@ import ( policiesv1 "github.com/kubewarden/kubewarden-controller/pkg/apis/policies/v1" "github.com/onsi/gomega/types" - . "github.com/onsi/gomega" + . "github.com/onsi/gomega" //nolint:revive admissionregistrationv1 "k8s.io/api/admissionregistration/v1" corev1 "k8s.io/api/core/v1" diff --git a/internal/pkg/admission/policy-server-deployment.go b/internal/pkg/admission/policy-server-deployment.go index 08e8deda..f9e6e79d 100644 --- a/internal/pkg/admission/policy-server-deployment.go +++ b/internal/pkg/admission/policy-server-deployment.go @@ -5,6 +5,7 @@ import ( "fmt" "path/filepath" "reflect" + "strconv" policiesv1 "github.com/kubewarden/kubewarden-controller/pkg/apis/policies/v1" appsv1 "k8s.io/api/apps/v1" @@ -237,7 +238,7 @@ func (r *Reconciler) deployment(configMapVersion string, policyServer *policiesv }, { Name: "KUBEWARDEN_PORT", - Value: fmt.Sprintf("%d", constants.PolicyServerPort), + Value: strconv.Itoa(constants.PolicyServerPort), }, { Name: "KUBEWARDEN_POLICIES_DOWNLOAD_DIR", diff --git a/pkg/apis/policies/v1/webhook_suite_test.go b/pkg/apis/policies/v1/webhook_suite_test.go index 16945fb6..682d60a2 100644 --- a/pkg/apis/policies/v1/webhook_suite_test.go +++ b/pkg/apis/policies/v1/webhook_suite_test.go @@ -25,8 +25,8 @@ import ( "testing" "time" - . "github.com/onsi/ginkgo/v2" - . "github.com/onsi/gomega" + . "github.com/onsi/ginkgo/v2" //nolint:revive + . "github.com/onsi/gomega" //nolint:revive admissionv1beta1 "k8s.io/api/admission/v1beta1" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"