Skip to content

Commit

Permalink
Merge pull request #18766 from ahrtr/f_functions_20241022
Browse files Browse the repository at this point in the history
Add comment to clarify non-f-functions on golang standard lib
  • Loading branch information
ahrtr authored Oct 23, 2024
2 parents bb381d4 + 9060226 commit 4b59ec1
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit 4b59ec1

Please sign in to comment.