Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix lint error, bump golangci-lint version #3972

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: v1.61
version: v1.62
args: --timeout=5m

golangci-test-e2e:
Expand All @@ -62,5 +62,5 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: v1.61
version: v1.62
args: --timeout=5m --build-tags e2e ./test
8 changes: 4 additions & 4 deletions pkg/cosign/rego/rego.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ func ValidateJSONWithModuleInput(jsonBody []byte, moduleInput string) (warnings
return nil, fmt.Errorf("policy is not compliant for query '%s'", query)
}

func evaluateRegoEvalMapResult(query string, response []interface{}) (warning error, error error) {
error = fmt.Errorf("policy is not compliant for query %q", query) //nolint: revive
func evaluateRegoEvalMapResult(query string, response []interface{}) (warning error, retErr error) {
retErr = fmt.Errorf("policy is not compliant for query %q", query) //nolint: revive
for _, r := range response {
rMap := r.(map[string]interface{})
mapBytes, err := json.Marshal(rMap)
Expand All @@ -152,7 +152,7 @@ func evaluateRegoEvalMapResult(query string, response []interface{}) (warning er
return fmt.Errorf("warning: %s", resultObject.Warning), nil
}
warning = errors.New(resultObject.Warning)
error = fmt.Errorf("policy is not compliant for query '%s' with errors: %s", query, resultObject.Error) //nolint: revive
retErr = fmt.Errorf("policy is not compliant for query '%s' with errors: %s", query, resultObject.Error) //nolint: revive
}
return warning, error
return warning, retErr
}
Loading