build: Update golangci-lint to v2.0.2
Various changes in this new major version, including a new config file format: - "gofmt" and "goimports" are now categorized as formatters (instead of linters) and are moved to their own section. - The functionality of "gosimple" has been bundled into "staticcheck". - "typecheck" is now always on and cannot be independently enabled/disabled.
This commit is contained in:
parent
30dcf49c62
commit
5263bfc2e1
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.64.5"
|
||||
run: "curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.0.2"
|
||||
- name: Test and Lint
|
||||
run: ./run_tests.sh
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
version: "2"
|
||||
run:
|
||||
deadline: 10m
|
||||
|
||||
timeout: 10m
|
||||
linters:
|
||||
disable-all: true
|
||||
default: none
|
||||
enable:
|
||||
- asciicheck
|
||||
- bidichk
|
||||
@ -17,9 +17,6 @@ linters:
|
||||
- fatcontext
|
||||
- goconst
|
||||
- godot
|
||||
- gofmt
|
||||
- goimports
|
||||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- makezero
|
||||
@ -34,9 +31,16 @@ linters:
|
||||
- revive
|
||||
- staticcheck
|
||||
- tparallel
|
||||
- typecheck
|
||||
- unconvert
|
||||
- usestdlibvars
|
||||
- usetesting
|
||||
- unparam
|
||||
- unused
|
||||
- usestdlibvars
|
||||
- usetesting
|
||||
exclusions:
|
||||
presets:
|
||||
- comments
|
||||
- std-error-handling
|
||||
formatters:
|
||||
enable:
|
||||
- gofmt
|
||||
- goimports
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user