woodpecker/.golangci.yml
qwerty287 2f963d70e7
Add linting for any (#2893)
Add gofmt rules to make sure `interface{}` is not used but only `any`.
2023-11-29 20:21:18 +01:00

54 lines
879 B
YAML

linters-settings:
gofmt:
simplify: true
rewrite-rules:
- pattern: interface{}
replacement: any
misspell:
locale: US
gofumpt:
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
- zerologlint
run:
timeout: 5m
issues:
exclude-rules:
# 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