From 8325fccc13299dc5e2311ec796ff2aca3c17c3d6 Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Thu, 14 Dec 2023 10:09:03 +0100 Subject: [PATCH] Add linting for `log.Fatal()` --- .golangci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index e2bec6801c..0e15e61450 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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