From 1ea18e96b46259014283a6070e4d834737e6c4da Mon Sep 17 00:00:00 2001 From: Laurent Demailly Date: Thu, 22 Aug 2024 17:47:12 -0700 Subject: [PATCH] Pin linter version and fix nolintlint/gosec fix (#174) * Pin linter version Same as https://github.com/fortio/workflows/pull/67 (need to figure cross org share actually rather than copy-pasta) * Fix the nolintlint now that gosec is fixed and the fix in linters 1.60.3 * Update .github/workflows/gochecks.yml --- .github/workflows/gochecks.yml | 2 ++ eval/eval.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gochecks.yml b/.github/workflows/gochecks.yml index 437481c6..ae7d064a 100644 --- a/.github/workflows/gochecks.yml +++ b/.github/workflows/gochecks.yml @@ -27,6 +27,8 @@ jobs: run: curl -fsS -o .golangci.yml https://raw.githubusercontent.com/fortio/workflows/main/golangci.yml - name: Run golangci-lint uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # pin@v6 + with: + version: v1.60.3 - name: Run tests run: | go version diff --git a/eval/eval.go b/eval/eval.go index bd44fce0..8cdd8416 100644 --- a/eval/eval.go +++ b/eval/eval.go @@ -387,7 +387,7 @@ func evalIndexExpression(left, index object.Object) object.Object { if idx < 0 || idx >= int64(len(str)) { return object.NULL } - return object.Integer{Value: int64(str[idx])} //nolint:gosec // https://github.com/securego/gosec/issues/1185 + return object.Integer{Value: int64(str[idx])} case left.Type() == object.ARRAY && idxOrZero.Type() == object.INTEGER: return evalArrayIndexExpression(left, idxOrZero) case left.Type() == object.MAP: