core: fix golang linter issues with variables in loops

Loop variables cannot be reliably uses since they will
change with each iteration. Update these loop variable
uses to be safe by indexing the slice rather than
using the loop variable directly.

Also suppress the linter issues for passwords used
in tests.

Signed-off-by: travisn <tnielsen@redhat.com>
(cherry picked from commit 6f8e42422d)
This commit is contained in:
travisn committed 2024-01-05 11:53:02 -07:00
1 parent e261c61000
commit 500dd36077
10 files changed
+21 -16

No files matched your search

+2 -2
View File
@@ -29,12 +29,12 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: "1.21"
go-version: "1.20"
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.53
version: v1.55
# Optional: working directory, useful for monorepos
# working-directory: somedir