From 2b7f7da363a4b61f89cee2048eaf8bf63209eda1 Mon Sep 17 00:00:00 2001 From: Bartosz Majsak Date: Thu, 11 Jul 2024 14:33:48 +0200 Subject: [PATCH] chore(lint): skips true|false for goconst (#1110) As we have labels and annotations with values either `true` or `false` we often compare them in the code. This leads to complains of `goconst` linter about extracting these "magic words" to constants. As this are obvious values to check against there's little benefit of doing so. This change configures `goconst` for golangci-lint runner to skip such cases. --- .golangci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 33d7ac791a0..3ee5532a021 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -15,6 +15,8 @@ linters-settings: - dot skip-generated: false custom-order: true + goconst: + ignore-strings: "true|false" errcheck: check-type-assertions: true exhaustive: