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

Add comment to clarify non-f-functions on golang standard lib #18766

Merged
merged 1 commit into from
Oct 23, 2024
Merged
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
5 changes: 5 additions & 0 deletions tools/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,9 @@ linters-settings: # please keep this alphabetized
# there is no variable-length variables, i.e. require require.NoErrorf for both cases below:
# require.NoErrorf(t, err, "whatever message")
# require.NoErrorf(t, err, "whatever message: %v", v)
#
# Note from golang programming perspective, we still prefer non-f-functions (i.e. fmt.Print)
# to f-functions (i.e. fmt.Printf) when there is no variable-length parameters. It's accepted
# to always require f-functions for stretchr/testify, but not for golang standard lib.
# Also refer to https://github.com/etcd-io/etcd/pull/18741#issuecomment-2422395914
require-f-funcs: true