mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-25 19:31:05 +00:00
Add linting for log.Fatal()
(#2946)
Closes https://github.com/woodpecker-ci/woodpecker/issues/1509
This commit is contained in:
parent
360b41f961
commit
0099ff5d26
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue