Skip to content

Commit

Permalink
Use linter from makefile target in the build workflow
Browse files Browse the repository at this point in the history
By default, the linter uses the latest version (currently v1.62.0).
In v1.62.0, a new max-public-structs linter was added. Significant
changes are required in our codebase to enable this linter.
  • Loading branch information
eromanova authored and Kshatrix committed Nov 13, 2024
1 parent 92ab5b2 commit 5c28be7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ jobs:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
args: --timeout 10m0s
run: GOLANGCI_LINT_TIMEOUT=10m make lint
- name: Verify all generated pieces are up-to-date
run: make generate-all && git add -N . && git diff --exit-code
- name: Unit tests
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ test-e2e: cli-install

.PHONY: lint
lint: golangci-lint ## Run golangci-lint linter & yamllint
@$(GOLANGCI_LINT) run
@$(GOLANGCI_LINT) run --timeout=$(GOLANGCI_LINT_TIMEOUT)

.PHONY: lint-fix
lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes
Expand Down Expand Up @@ -429,6 +429,7 @@ AWSCLI ?= $(LOCALBIN)/aws
CONTROLLER_TOOLS_VERSION ?= v0.16.3
ENVTEST_VERSION ?= release-0.17
GOLANGCI_LINT_VERSION ?= v1.61.0
GOLANGCI_LINT_TIMEOUT ?= 1m
HELM_VERSION ?= v3.15.1
KIND_VERSION ?= v0.23.0
YQ_VERSION ?= v4.44.2
Expand Down

0 comments on commit 5c28be7

Please sign in to comment.