From 4a82af5e428704c4964f360d8ed1e86c6ad6e6e5 Mon Sep 17 00:00:00 2001 From: Andrew Nesbitt Date: Fri, 22 May 2026 11:35:13 +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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 0c1a71e..b9ac6cd 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -3,6 +3,8 @@ linters: disable: - unused settings: + goconst: + ignore-tests: true ireturn: allow: - error