diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2aeadd5..341b265 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,8 @@ jobs: run: go mod tidy && git diff --no-patch --exit-code - name: Golangci-lint uses: golangci/golangci-lint-action@v9.2.0 + with: + version: v2.12.2 - name: Run unit tests run: go test ./... - name: GoReleaser Build Snapshot diff --git a/.golangci.yaml b/.golangci.yaml index 6dfe558..6713383 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -13,6 +13,13 @@ linters: - unparam disable: - errcheck + settings: + goconst: + min-len: 2 + min-occurrences: 5 + ignore-string-values: + - 'true' + - 'false' exclusions: generated: lax presets: diff --git a/internal/filter/filter_test.go b/internal/filter/filter_test.go index 87852e8..f7a02e2 100644 --- a/internal/filter/filter_test.go +++ b/internal/filter/filter_test.go @@ -52,7 +52,7 @@ func TestFilterByPredicate(t *testing.T) { newFakeObj("o2", now.Add(-120*time.Second)), }), givenMaxAge: "119s", - expectedNames: []string{"o1"}, + expectedNames: []string{"o1"}, // nolint: goconst // not relevant for a const }, { name: "two objects, both too old",