Skip to content

Commit

Permalink
formatter: make description of require-f-funcs flag consistent with g…
Browse files Browse the repository at this point in the history
…olangci-lint
  • Loading branch information
Antonboom committed Nov 13, 2024
1 parent 8fd3485 commit 8ca1d1a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 42 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ Also, verbs in the format string of f-assertions are highlighted by an IDE, e.g.
<br>

> [!CAUTION]
> `--formatter.require-f-funcs` requires f-assertions **even if there are no variable-length variables**, i.e. it
> `--formatter.require-f-funcs` requires f-assertions, **even if there are no variable-length variables**, i.e. it
> requires `require.NoErrorf` for both these cases:
> ```
> require.NoErrorf(t, err, "unexpected error")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func BindToFlags(cfg *Config, fs *flag.FlagSet) {
"to enable go vet's printf checks")
fs.BoolVar(&cfg.Formatter.RequireFFuncs,
"formatter.require-f-funcs", false,
"to require f-assertions if format string is used (even if there are no variable-length variables)")
"to require f-assertions (e.g. assert.Equalf) if format string is used, even if there are no variable-length variables.")

fs.BoolVar(&cfg.GoRequire.IgnoreHTTPHandlers,
"go-require.ignore-http-handlers", false,
Expand Down

0 comments on commit 8ca1d1a

Please sign in to comment.