Skip to content

Commit

Permalink
Use latest golangci-lint release and update linter list. (#484)
Browse files Browse the repository at this point in the history
* ci: Update linter to 1.59.1.

Also remove deprecated linter "vetshadow", its functionality is now
included in the "govet" linter.

* ci: Add new linters.

- fatcontext - Detects nested contexts in loops.
- mirror - Reports wrong mirror patterns of bytes/strings usage.
- nilnil - Checks that there is no simultaneous return of nil error and
  an invalid value.
- usestdlibvars - detect the possibility to use variables/constants from
  the Go standard library.
  • Loading branch information
jholdstock committed Jul 8, 2024
1 parent aa8d2a3 commit 63b2a61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
- name: Build
run: go build ./...
- name: Install Linters
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.58.1"
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.59.1"
- name: Test and Lint
run: ./run_tests.sh
5 changes: 4 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ linters:
- errorlint
- exhaustive
- exportloopref
- fatcontext
- goconst
- godot
- gofmt
Expand All @@ -22,8 +23,10 @@ linters:
- govet
- ineffassign
- makezero
- mirror
- misspell
- nilerr
- nilnil
- nosprintfhostport
- prealloc
- predeclared
Expand All @@ -33,6 +36,6 @@ linters:
- tparallel
- typecheck
- unconvert
- usestdlibvars
- unparam
- unused
- vetshadow

0 comments on commit 63b2a61

Please sign in to comment.