Skip to content

Commit deac722

Browse files
authored
fix: Update dependencies to latest. (#684)
1 parent 0898f42 commit deac722

File tree

12 files changed

+232
-209
lines changed

12 files changed

+232
-209
lines changed

.golangci.yml

Lines changed: 53 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,59 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
# .golangci.yml
14+
15+
version: "2"
1516
linters:
16-
disable-all: true
17+
default: none
1718
enable:
18-
- goimports
19-
- revive
2019
- importas
21-
issues:
22-
exclude-use-default: false
23-
linters-settings:
24-
importas:
25-
no-unaliased: true
26-
alias:
27-
- pkg: "github.com/GoogleCloudPlatform/cloud-sql-proxy-operator/internal/api/v1alpha1"
28-
alias: "cloudsqlapi"
29-
revive:
30-
rules:
31-
- name: blank-imports
32-
- name: context-as-argument
33-
- name: context-keys-type
34-
- name: dot-imports
35-
- name: error-return
36-
- name: error-strings
37-
- name: error-naming
38-
# - name: exported
39-
- name: if-return
40-
- name: increment-decrement
41-
- name: var-naming
42-
- name: var-declaration
43-
- name: package-comments
44-
- name: range
45-
- name: receiver-naming
46-
- name: time-naming
47-
- name: unexported-return
48-
- name: indent-error-flow
49-
- name: errorf
50-
- name: empty-block
51-
- name: superfluous-else
52-
- name: unused-parameter
53-
- name: unreachable-code
54-
- name: redefines-builtin-id
55-
- name: range-val-in-closure
56-
- name: range-val-address
57-
- name: import-shadowing
58-
run:
59-
timeout: 5m
20+
- revive
21+
settings:
22+
importas:
23+
alias:
24+
- pkg: github.com/GoogleCloudPlatform/cloud-sql-proxy-operator/internal/api/v1alpha1
25+
alias: cloudsqlapi
26+
no-unaliased: true
27+
revive:
28+
rules:
29+
- name: blank-imports
30+
- name: context-as-argument
31+
- name: context-keys-type
32+
- name: dot-imports
33+
- name: error-return
34+
- name: error-strings
35+
- name: error-naming
36+
- name: if-return
37+
- name: increment-decrement
38+
- name: var-naming
39+
- name: var-declaration
40+
- name: package-comments
41+
- name: range
42+
- name: receiver-naming
43+
- name: time-naming
44+
- name: unexported-return
45+
- name: indent-error-flow
46+
- name: errorf
47+
- name: empty-block
48+
- name: superfluous-else
49+
- name: unused-parameter
50+
- name: unreachable-code
51+
- name: redefines-builtin-id
52+
- name: range-val-in-closure
53+
- name: range-val-address
54+
- name: import-shadowing
55+
exclusions:
56+
generated: lax
57+
paths:
58+
- third_party$
59+
- builtin$
60+
- examples$
61+
formatters:
62+
enable:
63+
- goimports
64+
exclusions:
65+
generated: lax
66+
paths:
67+
- third_party$
68+
- builtin$
69+
- examples$

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# Use distroless as minimal base image to package the manager binary
1616
# Refer to https://github.com/GoogleContainerTools/distroless for more details
17-
FROM gcr.io/distroless/static:nonroot@sha256:c0f429e16b13e583da7e5a6ec20dd656d325d88e6819cafe0adb0828976529dc
17+
FROM gcr.io/distroless/static:nonroot@sha256:627d6c5a23ad24e6bdff827f16c7b60e0289029b0c79e9f7ccd54ae3279fb45f
1818

1919
# For multi-arch builds, use automatic platform build arguments
2020
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope

Dockerfile-operator

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
2828

2929
# Use distroless as minimal base image to package the manager binary
3030
# Refer to https://github.com/GoogleContainerTools/distroless for more details
31-
FROM gcr.io/distroless/static:nonroot@sha256:c0f429e16b13e583da7e5a6ec20dd656d325d88e6819cafe0adb0828976529dc
31+
FROM gcr.io/distroless/static:nonroot@sha256:627d6c5a23ad24e6bdff827f16c7b60e0289029b0c79e9f7ccd54ae3279fb45f
3232

3333
# For multi-arch builds, use automatic platform build arguments
3434
# see https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ SHELL = /usr/bin/env bash -o pipefail
5151
.SHELLFLAGS = -ec
5252

5353
## The version to use for the cert-manager operator
54-
CERT_MANAGER_VERSION=v1.17.2# renovate datasource=github-tags depName=cert-manager/cert-manager
54+
CERT_MANAGER_VERSION=v1.18.2# renovate datasource=github-tags depName=cert-manager/cert-manager
5555

5656
##@ General
5757

@@ -155,7 +155,7 @@ build_push_docker: # Build docker image with the operator. set IMG env var befor
155155
go_lint: golangci-lint # Run go lint tools, fail if unchecked errors
156156
# Implements golang CI based on settings described here:
157157
# See https://betterprogramming.pub/how-to-improve-code-quality-with-an-automatic-check-in-go-d18a5eb85f09
158-
$(GOLANGCI_LINT) run --fix --fast ./...
158+
$(GOLANGCI_LINT) run --fix ./...
159159

160160
.PHONY: tf_lint
161161
tf_lint: terraform # Run terraform fmt to ensure terraform code is consistent
@@ -439,11 +439,11 @@ CRD_REF_DOCS ?= $(LOCALBIN)/crd-ref-docs
439439
# additional whitespace will break the renovate regex rules.
440440

441441
KUBECTL_VERSION=v1.32.2# renovate datasource=github-tags depName=kubernetes/kubernetes
442-
TERRAFORM_VERSION=v1.11.4# renovate datasource=github-tags depName=hashicorp/terraform
442+
TERRAFORM_VERSION=v1.12.2# renovate datasource=github-tags depName=hashicorp/terraform
443443

444444
CONTROLLER_TOOLS_VERSION=v0.17.3# renovate datasource=go depName=sigs.k8s.io/controller-tools
445445
CRD_REF_DOCS_VERSION=v0.1.0# renovate datasource=go depName=github.com/elastic/crd-ref-docs
446-
GOLANGCI_LINT_VERSION=v1.64.8# renovate datasource=go depName=github.com/golangci/golangci-lint/cmd/golangci-lint
446+
GOLANGCI_LINT_VERSION=v2.2.2# renovate datasource=go depName=github.com/golangci/golangci-lint/cmd/golangci-lint
447447
GO_LICENSES_VERSION=v1.6.0# renovate datasource=go depName=github.com/google/go-licenses
448448

449449
KUSTOMIZE_VERSION=v5.6.0# don't manage with renovate, this repo has non-standard tags
@@ -498,7 +498,7 @@ $(TERRAFORM): $(LOCALBIN)
498498
.PHONY: golangci-lint
499499
golangci-lint: $(GOLANGCI_LINT) ## Download controller-gen locally if necessary.
500500
$(GOLANGCI_LINT): $(LOCALBIN)
501-
test -s $@ || GOBIN=$(LOCALBIN) go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
501+
test -s $@ || GOBIN=$(LOCALBIN) go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
502502

503503
.PHONY: go-licenses
504504
go-licenses: $(GO_LICENSES) ## Download controller-gen locally if necessary.

0 commit comments

Comments
 (0)