Skip to content

Commit

Permalink
fix lint error, bump golangci-lint version (#3972)
Browse files Browse the repository at this point in the history
Signed-off-by: Bob Callaway <bcallaway@google.com>
  • Loading branch information
bobcallaway authored Dec 16, 2024
1 parent 6094066 commit 15be941
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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
}

0 comments on commit 15be941

Please sign in to comment.