From 8b408d6b0bbc6fa0732a1b2852adb4deb26f8207 Mon Sep 17 00:00:00 2001 From: Ben Firestone Date: Mon, 8 Jun 2026 09:13:14 -0700 Subject: [PATCH] chore(lint): exclude goconst from test files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test fixtures intentionally repeat literals (status strings, IDs, paths) as self-contained sample data — DAMP (Descriptive And Meaningful Phrases) over DRY. Extracting them into constants hurts test readability without the single-source-of-truth payoff that goconst targets in production code. This mirrors the existing dupl exclusion for _test.go ("Test files often have similar structures for readability"). Newer golangci-lint versions surface goconst on test files; this keeps that noise out consistently. --- .golangci.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.golangci.yaml b/.golangci.yaml index 272385b..59cec71 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -170,6 +170,9 @@ linters: - linters: - dupl # Duplicate code detection path: _test\.go # Test files often have similar structures for readability + - linters: + - goconst # Repeated string detection + path: _test\.go # Test fixtures repeat literals by design (DAMP > DRY) - linters: - testifylint # Testify linter path: _test\.go