From 4a8024355c8b0475a4c6acee09dbd52fd7c44fd9 Mon Sep 17 00:00:00 2001 From: Andrew Nesbitt Date: Fri, 22 May 2026 11:35:01 +0100 Subject: [PATCH] Set goconst to ignore test files Path exclusions only filter where goconst issues are reported, not which files contribute to the occurrence count, so a string used once in production code and twice in tests still gets flagged. The `ignore-tests` setting makes goconst skip test files entirely. --- .golangci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 1337d6b..2c7c6de 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,3 +2,6 @@ version: "2" linters: disable: - unused + settings: + goconst: + ignore-tests: true