From 89f7c76c4e672132744e2fee2c5b0f186b9ebd8a Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sun, 25 Sep 2022 17:08:41 +0200 Subject: [PATCH] lint: allow empty else branches --- .golangci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 7d99bc4..bc1cdcd 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -7,4 +7,10 @@ issues: - path: _test\.go linters: - errcheck + # Disable staticcheck 'Empty body in an if or else branch' as it's useful + # to put a comment into an empty else-clause that explains why whatever + # is done in the if-caluse is not necessary if the condition is false. + - linters: + - staticcheck + text: "SA9003:"