Golangci-lint: Enable configuration of govet -printfuncs

Created on 25 Aug 2018  路  5Comments  路  Source: golangci/golangci-lint

Would it be possible to be able to configure govet printfuncs?

Most helpful comment

I think in 1-2 days

All 5 comments

This would be very useful. I'm having to run go vet -printfuncs Debugf,Infof,Logf,Errorf in addition to golangci-lint - it would be nice to include that too :-)

Thank you! It would be useful feature

I've merged #443 with the newest go vet. It supports:

  1. automatic detection of printing functions
  2. if the function wasn't classified automatically you have two choices:

    • add if false { _ = fmt.Sprintf(format, args...) } as described in go tool vet help printf

    • configure it in .golangci.yml via linters-settings.govet.settings.printf.funcs, see example in .golangci.yml

Thank you @jirfag - I've tested that with my codebase and it works perfectly :-)

When are you planning a release? My CI will only use a release build of golangci-lint!

I think in 1-2 days

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jirfag picture jirfag  路  3Comments

liubog2008 picture liubog2008  路  3Comments

simonpasquier picture simonpasquier  路  4Comments

kpeu3i picture kpeu3i  路  3Comments

alessio picture alessio  路  4Comments