mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-16 09:15:21 +00:00
Add linting for log.Fatal()
(#2946)
Closes https://github.com/woodpecker-ci/woodpecker/issues/1509
This commit is contained in:
@@ -13,6 +13,7 @@ linters-settings:
|
|||||||
- context\.WithCancel$
|
- context\.WithCancel$
|
||||||
- ^print.*$
|
- ^print.*$
|
||||||
- panic
|
- panic
|
||||||
|
- ^log.Fatal().*$
|
||||||
errorlint:
|
errorlint:
|
||||||
errorf-multi: true
|
errorf-multi: true
|
||||||
|
|
||||||
@@ -48,7 +49,11 @@ issues:
|
|||||||
- staticcheck
|
- staticcheck
|
||||||
- revive
|
- revive
|
||||||
|
|
||||||
# let cli use print and panic
|
# let cli use print and panic and log.Fatal()
|
||||||
- path: 'cmd/*|cli/*'
|
- path: 'cmd/*|cli/*'
|
||||||
linters:
|
linters:
|
||||||
- forbidigo
|
- forbidigo
|
||||||
|
# allow some setup functions to use log.Fatal()
|
||||||
|
- path: 'server/web/web.go|server/plugins/encryption/tink_keyset_watcher.go'
|
||||||
|
linters:
|
||||||
|
- forbidigo
|
||||||
|
Reference in New Issue
Block a user