From 036ce5887b56fcddd1163963e5d751ba7998ac1e Mon Sep 17 00:00:00 2001 From: Andrew Nesbitt Date: Fri, 22 May 2026 11:33:50 +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 30fa0ba..c86ddb4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -9,3 +9,6 @@ linters: - gocritic - unparam - goconst + settings: + goconst: + ignore-tests: true