Use latest golangci-lint release and update linter list. (#484)
* 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.
This commit is contained in:
parent
aa8d2a34ea
commit
63b2a6117d
2
.github/workflows/go.yml
vendored
2
.github/workflows/go.yml
vendored
@ -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
|
||||
|
||||
@ -14,6 +14,7 @@ linters:
|
||||
- errorlint
|
||||
- exhaustive
|
||||
- exportloopref
|
||||
- fatcontext
|
||||
- goconst
|
||||
- godot
|
||||
- gofmt
|
||||
@ -22,8 +23,10 @@ linters:
|
||||
- govet
|
||||
- ineffassign
|
||||
- makezero
|
||||
- mirror
|
||||
- misspell
|
||||
- nilerr
|
||||
- nilnil
|
||||
- nosprintfhostport
|
||||
- prealloc
|
||||
- predeclared
|
||||
@ -33,6 +36,6 @@ linters:
|
||||
- tparallel
|
||||
- typecheck
|
||||
- unconvert
|
||||
- usestdlibvars
|
||||
- unparam
|
||||
- unused
|
||||
- vetshadow
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user