Skip to content

Commit

Permalink
Upgrade golangci-lint to 1.56
Browse files Browse the repository at this point in the history
  • Loading branch information
ncthompson committed Feb 19, 2024
1 parent b8d1389 commit 20daf0a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- name: Run golangci-lint
run: |
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.3
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v1.56.2/install.sh | sh -s -- -b $(go env GOPATH)/bin
$(go env GOPATH)/bin/golangci-lint run -v
- name: Run tests
Expand Down
18 changes: 8 additions & 10 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
linters:
enable-all: false
enable:
# Enabled by default in golangci-lint v1.13.2
- deadcode
- errcheck
- govet
- ineffassign
- typecheck
- varcheck
# Disabled by default in golangci-lint v1.13.2
- dupl
- goconst
- gofmt
- golint
- unconvert
# The following result in high memory usage (>1GB)
# https://github.com/golangci/golangci-lint/issues/337
- revive
- staticcheck
- structcheck
- gosimple
- unused

issues:
max-per-linter: 0
max-same-issues: 0
max-same-issues: 0

exclude-rules:
- path: _test.go
linters:
- revive
text: "unused-parameter:"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gofmt:
lint:
docker run --rm -it \
-w /src -v $(shell pwd):/src \
golangci/golangci-lint:v1.23 golangci-lint run \
golangci/golangci-lint:v1.56 golangci-lint run \
-v -c .golangci.yml

.PHONY: build-all
Expand Down

0 comments on commit 20daf0a

Please sign in to comment.