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
|
- name: Build
|
||||||
run: go build ./...
|
run: go build ./...
|
||||||
- name: Install Linters
|
- 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
|
- name: Test and Lint
|
||||||
run: ./run_tests.sh
|
run: ./run_tests.sh
|
||||||
|
|||||||
@ -14,6 +14,7 @@ linters:
|
|||||||
- errorlint
|
- errorlint
|
||||||
- exhaustive
|
- exhaustive
|
||||||
- exportloopref
|
- exportloopref
|
||||||
|
- fatcontext
|
||||||
- goconst
|
- goconst
|
||||||
- godot
|
- godot
|
||||||
- gofmt
|
- gofmt
|
||||||
@ -22,8 +23,10 @@ linters:
|
|||||||
- govet
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- makezero
|
- makezero
|
||||||
|
- mirror
|
||||||
- misspell
|
- misspell
|
||||||
- nilerr
|
- nilerr
|
||||||
|
- nilnil
|
||||||
- nosprintfhostport
|
- nosprintfhostport
|
||||||
- prealloc
|
- prealloc
|
||||||
- predeclared
|
- predeclared
|
||||||
@ -33,6 +36,6 @@ linters:
|
|||||||
- tparallel
|
- tparallel
|
||||||
- typecheck
|
- typecheck
|
||||||
- unconvert
|
- unconvert
|
||||||
|
- usestdlibvars
|
||||||
- unparam
|
- unparam
|
||||||
- unused
|
- unused
|
||||||
- vetshadow
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user