Skip to content

Commit 35153e7

Browse files
committed
Fix lint: upgrade to support go1.22
golangci-lint supports go1.22 since v1.56.0, per golangci/golangci-lint#4273. Switch to using Github Actions for lint check.
1 parent 78f31c9 commit 35153e7

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.github/workflows/golangci-lint.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: golangci-lint
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- release-0.31
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
env:
13+
GO_VERSION: v1.22
14+
GOLANGCI_LINT_VERSION: v1.56
15+
16+
jobs:
17+
golangci:
18+
name: lint
19+
runs-on: ubuntu-22.04
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-go@v5
23+
with:
24+
go-version: ${{ env.GO_VERSION }}
25+
- name: golangci-lint
26+
uses: golangci/golangci-lint-action@v6
27+
with:
28+
version: ${{ env.GOLANGCI_LINT_VERSION }}
29+
args: --verbose

.golangci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
run:
2-
timeout: 3m
2+
timeout: 5m
33
skip-dirs:
44
- vendor
55
linters:

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ endif
3333
GOOS ?= $(shell go env GOOS)
3434
GOARCH ?= $(shell go env GOARCH)
3535
INSTALL_LOCATION:=$(shell go env GOPATH)/bin
36-
GOLANGCI_LINT_VERSION ?= 1.54.0
36+
GOLANGCI_LINT_VERSION ?= 1.56.2
3737
GOSEC_VERSION ?= 2.13.1
3838

3939
REGISTRY ?= gcr.io/$(shell gcloud config get-value project)

0 commit comments

Comments
 (0)