From 024f0fd7f26df31d5ceafed0ca3cd482a8df713a Mon Sep 17 00:00:00 2001 From: Andrew Nesbitt Date: Fri, 22 May 2026 11:34:49 +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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 366252d..4020087 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,3 +3,8 @@ version: "2" formatters: enable: - gofmt + +linters: + settings: + goconst: + ignore-tests: true