build: reactivate golangci-lint (#10118)
With DeepSource becoming (imho) less and less useful, let's get this one back on track. It will likely require adjusting over time.
This commit is contained in:
@@ -127,6 +127,7 @@ jobs:
|
|||||||
- package-debian
|
- package-debian
|
||||||
- package-windows
|
- package-windows
|
||||||
- govulncheck
|
- govulncheck
|
||||||
|
- golangci
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -1020,3 +1021,22 @@ jobs:
|
|||||||
go run build.go assets
|
go run build.go assets
|
||||||
go install golang.org/x/vuln/cmd/govulncheck@latest
|
go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||||
govulncheck ./...
|
govulncheck ./...
|
||||||
|
|
||||||
|
golangci:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Run golangci-lint
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: ${{ env.GO_VERSION }}
|
||||||
|
cache: false
|
||||||
|
check-latest: true
|
||||||
|
|
||||||
|
- name: ensure asset generation
|
||||||
|
run: go run build.go assets
|
||||||
|
|
||||||
|
- name: golangci-lint
|
||||||
|
uses: golangci/golangci-lint-action@v8
|
||||||
|
with:
|
||||||
|
only-new-issues: true
|
||||||
|
|||||||
+39
-11
@@ -1,39 +1,67 @@
|
|||||||
|
version: "2"
|
||||||
linters:
|
linters:
|
||||||
enable-all: true
|
default: all
|
||||||
disable:
|
disable:
|
||||||
- cyclop
|
- cyclop
|
||||||
- depguard
|
- depguard
|
||||||
- exhaustive
|
- exhaustive
|
||||||
- exhaustruct
|
- exhaustruct
|
||||||
|
- forbidigo
|
||||||
- funlen
|
- funlen
|
||||||
- gci
|
|
||||||
- gochecknoglobals
|
- gochecknoglobals
|
||||||
- gochecknoinits
|
- gochecknoinits
|
||||||
- gocognit
|
- gocognit
|
||||||
- goconst
|
- goconst
|
||||||
- gocyclo
|
- gocyclo
|
||||||
- godox
|
- godox
|
||||||
- gofmt
|
|
||||||
- goimports
|
|
||||||
- gomoddirectives
|
- gomoddirectives
|
||||||
- inamedparam
|
- inamedparam
|
||||||
- interfacebloat
|
- interfacebloat
|
||||||
- ireturn
|
- ireturn
|
||||||
- lll
|
- lll
|
||||||
- maintidx
|
- maintidx
|
||||||
|
- mnd
|
||||||
|
- musttag
|
||||||
- nestif
|
- nestif
|
||||||
|
- nlreturn
|
||||||
- nonamedreturns
|
- nonamedreturns
|
||||||
- paralleltest
|
- paralleltest
|
||||||
|
- prealloc
|
||||||
|
- predeclared
|
||||||
- protogetter
|
- protogetter
|
||||||
- scopelint
|
- recvcheck
|
||||||
|
- revive
|
||||||
- tagalign
|
- tagalign
|
||||||
- tagliatelle
|
- tagliatelle
|
||||||
- testpackage
|
- testpackage
|
||||||
|
- usetesting # go 1.24
|
||||||
- varnamelen
|
- varnamelen
|
||||||
|
- whitespace
|
||||||
|
- wrapcheck
|
||||||
- wsl
|
- wsl
|
||||||
|
exclusions:
|
||||||
issues:
|
generated: lax
|
||||||
exclude-dirs:
|
presets:
|
||||||
- internal/gen
|
- comments
|
||||||
- cmd/dev
|
- common-false-positives
|
||||||
- repos
|
- legacy
|
||||||
|
- std-error-handling
|
||||||
|
paths:
|
||||||
|
- internal/gen
|
||||||
|
- cmd/dev
|
||||||
|
- repos
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
formatters:
|
||||||
|
enable:
|
||||||
|
- gofumpt
|
||||||
|
exclusions:
|
||||||
|
generated: lax
|
||||||
|
paths:
|
||||||
|
- internal/gen
|
||||||
|
- cmd/dev
|
||||||
|
- repos
|
||||||
|
- third_party$
|
||||||
|
- builtin$
|
||||||
|
- examples$
|
||||||
|
|||||||
Reference in New Issue
Block a user