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
|
- 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.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
|
- name: Test and Lint
|
||||||
run: ./run_tests.sh
|
run: ./run_tests.sh
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
|
version: "2"
|
||||||
run:
|
run:
|
||||||
deadline: 10m
|
timeout: 10m
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
disable-all: true
|
default: none
|
||||||
enable:
|
enable:
|
||||||
- asciicheck
|
- asciicheck
|
||||||
- bidichk
|
- bidichk
|
||||||
@ -17,9 +17,6 @@ linters:
|
|||||||
- fatcontext
|
- fatcontext
|
||||||
- goconst
|
- goconst
|
||||||
- godot
|
- godot
|
||||||
- gofmt
|
|
||||||
- goimports
|
|
||||||
- gosimple
|
|
||||||
- govet
|
- govet
|
||||||
- ineffassign
|
- ineffassign
|
||||||
- makezero
|
- makezero
|
||||||
@ -34,9 +31,16 @@ linters:
|
|||||||
- revive
|
- revive
|
||||||
- staticcheck
|
- staticcheck
|
||||||
- tparallel
|
- tparallel
|
||||||
- typecheck
|
|
||||||
- unconvert
|
- unconvert
|
||||||
- usestdlibvars
|
|
||||||
- usetesting
|
|
||||||
- unparam
|
- unparam
|
||||||
- unused
|
- unused
|
||||||
|
- usestdlibvars
|
||||||
|
- usetesting
|
||||||
|
exclusions:
|
||||||
|
presets:
|
||||||
|
- comments
|
||||||
|
- std-error-handling
|
||||||
|
formatters:
|
||||||
|
enable:
|
||||||
|
- gofmt
|
||||||
|
- goimports
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user