From 3204ad56fe5e8aa9d078e775a24eb412b4a6be2a Mon Sep 17 00:00:00 2001 From: Rebecca Mahany-Horton Date: Mon, 8 Jul 2024 14:56:27 -0400 Subject: [PATCH] Reenable sloglint now that golangci-lint includes sloglint 0.7.1 (#1733) --- .github/workflows/lint.yml | 4 ++-- .golangci.yml | 8 ++++---- ee/dataflatten/flatten.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 247fe46e8..3500b994e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -29,9 +29,9 @@ jobs: - run: make deps - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: - skip-pkg-cache: true + skip-save-cache: true # Run again as a workaround for https://github.com/golangci/golangci-lint-action/issues/362 - name: golangci-lint diff --git a/.golangci.yml b/.golangci.yml index e43aa98cc..3c6451648 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,4 @@ run: - skip-dirs: - - test-cmds timeout: 5m linters: @@ -15,7 +13,7 @@ linters: - nakedret - paralleltest - revive - # - sloglint # TODO -- re-enable once golangci-lint bumps to sloglint v0.7.1 + - sloglint - sqlclosecheck - staticcheck - unconvert @@ -28,7 +26,7 @@ linters: linters-settings: errcheck: - ignore: github.com/go-kit/kit/log:Log + exclude-functions: github.com/go-kit/kit/log:Log gofmt: simplify: false forbidigo: @@ -78,3 +76,5 @@ issues: - linters: - paralleltest text: "does not use range value in test Run" + exclude-dirs: + - test-cmds diff --git a/ee/dataflatten/flatten.go b/ee/dataflatten/flatten.go index 67be2506d..6036da27c 100644 --- a/ee/dataflatten/flatten.go +++ b/ee/dataflatten/flatten.go @@ -378,7 +378,7 @@ func (fl *Flattener) queryMatchArrayElement(data interface{}, arrIndex int, quer "caller", "queryMatchArrayElement", "rows_so_far", len(fl.rows), "query", queryTerm, - "arrIndex", arrIndex, + "arr_index", arrIndex, ) // strip off the key re-write denotation before trying to match