Add linting for log.Fatal() (#2946)

Closes https://github.com/woodpecker-ci/woodpecker/issues/1509
This commit is contained in:
qwerty287 2023-12-14 10:18:14 +01:00 committed by GitHub
parent 360b41f961
commit 0099ff5d26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,6 +13,7 @@ linters-settings:
- context\.WithCancel$
- ^print.*$
- panic
- ^log.Fatal().*$
errorlint:
errorf-multi: true
@ -48,7 +49,11 @@ issues:
- staticcheck
- revive
# let cli use print and panic
# let cli use print and panic and log.Fatal()
- 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