woodpecker/.golangci.yml
Lauris BH 46452fbd84
Update Go dependencies and minimal Go version to 1.20 (#1650)
Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: 6543 <6543@obermui.de>
2023-03-21 00:48:15 +01:00

56 lines
950 B
YAML

linters-settings:
gofmt:
simplify: true
misspell:
locale: US
gofumpt:
lang-version: "1.20"
extra-rules: true
forbidigo:
forbid:
- context\.WithCancel$
- ^print.*$
- panic
errorlint:
errorf-multi: true
linters:
disable-all: true
enable:
- bidichk
- errcheck
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- misspell
- revive
- staticcheck
- typecheck
- unused
- whitespace
- gofumpt
- errorlint
- forbidigo
run:
timeout: 5m
go: '1.20'
issues:
exclude-rules:
- path: woodpecker-go/woodpecker/client.go|server/swagger/swagger.go
linters:
- deadcode
- unused
# gin force us to use string as context key
- path: server/store/context.go
linters:
- staticcheck
- revive
# let cli use print and panic
- path: "cmd/*|cli/*"
linters:
- forbidigo