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

Update golangci-lint #2606

Merged
merged 1 commit into from
Dec 2, 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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ check: $(BIN_GOLANGCI_LINT) ## Check code quality (lint)
cd test && $(BIN_GOLANGCI_LINT) run --timeout 300s

$(BIN_GOLANGCI_LINT):
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin v1.59.1
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin v1.62.2

.PHONY: generate/zz_filesystem_generated.go
generate/zz_filesystem_generated.go: clean_templates templates/certs/ca-certificates.crt
Expand Down
2 changes: 1 addition & 1 deletion cmd/func-util/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func main() {
}

func unknown(_ context.Context) error {
return fmt.Errorf("unknown command: " + os.Args[0])
return fmt.Errorf("unknown command: %q", os.Args[0])
}

func socat(ctx context.Context) error {
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func mergeEnvs(envs []fn.Env, envToUpdate *util.OrderedMap, envToRemove []string

errMsg := fn.ValidateEnvs(envs)
if len(errMsg) > 0 {
return []fn.Env{}, 0, fmt.Errorf(strings.Join(errMsg, "\n"))
return []fn.Env{}, 0, fmt.Errorf("error(s) while validating envs: %s", strings.Join(errMsg, "\n"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does the error(s) mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may be one or more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO something in the realm of covering plural form if present: e.g. 1 error vs. 2 errors

}

return envs, counter, nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/knative/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ func checkResourcesArePresent(ctx context.Context, namespace string, referencedS
}

if errMsg != "" {
return fmt.Errorf("\n" + errMsg)
return fmt.Errorf("error(s) while validating resources:\n%s", errMsg)
}

return nil
Expand Down
Loading