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:
1 parent
fda9381ee4
commit
83caa1b2bf
9 files changed
+17
-12
No files matched your search
@@ -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
|
||||
@@ -51,6 +51,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: "1.21.4"
|
||||
go-version: "1.21.4"
|
||||
- name: govulncheck
|
||||
uses: golang/govulncheck-action@v1
|
||||
Reference in new issue
Block a user