Skip to content

Commit

Permalink
Merge pull request #1338 from cheftako/updateDCL
Browse files Browse the repository at this point in the history
chore:lint upgrade golangci-lint
  • Loading branch information
google-oss-prow[bot] authored Mar 8, 2024
2 parents 6fc7b45 + 3d89fd3 commit e7735cc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ on:
- "third_party/**"
- "**.md"
- pkg/clients/generated
- config/tests
pull_request:
paths-ignore:
- "third_party/**"
- "**.md"
- pkg/clients/generated
- config/tests
permissions: read-all
jobs:
lint:
Expand All @@ -44,4 +46,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # v3.7.0
with:
version: v1.54.2 # should match the version in Makefile
version: v1.56.2 # should match the version in Makefile
15 changes: 15 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ run:
- third_party
- pkg/clients/generated
- scripts # todo acpana unskip
- temp-vendor
linters:
disable-all: true
enable:
Expand All @@ -44,3 +45,17 @@ linters:
# - unconvert
# - unused
# - whitespace
linters-settings:
revive:
rules:
- name: unused-parameter
severity: warning
disabled: true
govet:
enable-all: true
disable:
- fieldalignment
- nilness
- shadow
- testinggoroutine
- unusedwrite
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ UNMANAGED_DETECTOR_IMG ?= gcr.io/${PROJECT_ID}/unmanageddetector:${SHORT_SHA}
GOLANGCI_LINT_CACHE := $(shell pwd)/.tmp/golangci-lint
# When updating this, make sure to update the corresponding action in
# ./github/workflows/lint.yaml
GOLANGCI_LINT_VERSION := v1.54.2
GOLANGCI_LINT_VERSION := v1.56.2

# Use Docker BuildKit when building images to allow usage of 'setcap' in
# multi-stage builds (https://github.com/moby/moby/issues/38132)
Expand Down Expand Up @@ -98,7 +98,7 @@ lint:
docker run --rm -v $(shell pwd):/app \
-v ${GOLANGCI_LINT_CACHE}:/root/.cache/golangci-lint \
-w /app golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine \
golangci-lint run -v
golangci-lint run -v --timeout=10m

# Run go vet against code
.PHONY: vet
Expand Down
4 changes: 2 additions & 2 deletions README.UpdatingDCL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Approximately 25% of Config Connector resources leverage the [DCL](https://githu

Upgrade Process:

1. In the repository root directory, run make `upgrade-dcl` to update the DCL dependency.
1. Run `make read-pr` to ensure proper updates for all generated files.
1. In the repository root directory, run `make upgrade-dcl` to update the DCL dependency.
1. Run `make ready-pr` to ensure proper updates for all generated files.
1. Check both the DCL [release notes](https://github.com/GoogleCloudPlatform/declarative-resource-client-library/releases) and the generated files, especially diff in CRDs.
* Create a Pull Request titled "Update DCL to v1.58.0" (replace version as needed).
* In the PR description, list the new CRD fields and relevant bug fixes introduced by the DCL update.

0 comments on commit e7735cc

Please sign in to comment.