woodpecker/.golangci.yml

60 lines
1.1 KiB
YAML
Raw Normal View History

linters-settings:
gofmt:
simplify: true
rewrite-rules:
- pattern: interface{}
replacement: any
misspell:
locale: US
2022-01-06 06:44:14 +00:00
gofumpt:
extra-rules: true
forbidigo:
forbid:
- context\.WithCancel$
- ^print.*$
- panic
- ^log.Fatal().*$
errorlint:
errorf-multi: true
linters:
disable-all: true
enable:
- bidichk
- errcheck
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- misspell
- revive
- staticcheck
- typecheck
2021-11-27 14:29:37 +00:00
- unused
- whitespace
2022-01-06 06:44:14 +00:00
- gofumpt
- errorlint
- forbidigo
- zerologlint
2021-11-25 23:27:43 +00:00
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 and log.Fatal()
2023-10-24 12:42:05 +00:00
- path: 'cmd/*|cli/*'
linters:
- forbidigo
# allow some setup functions to use log.Fatal()
- path: 'server/web/web.go|server/plugins/encryption/tink_keyset_watcher.go'
linters:
- forbidigo