lint: enable go vet printf format arg checks for logging#4679
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4679 +/- ##
==========================================
- Coverage 54.38% 54.37% -0.02%
==========================================
Files 403 403
Lines 51928 51928
==========================================
- Hits 28243 28234 -9
- Misses 21308 21313 +5
- Partials 2377 2381 +4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
| linters: | ||
| - errcheck | ||
| - gofmt | ||
| # - gofmt |
There was a problem hiding this comment.
they're actually being enabled.. this is an exclude list, so the linters being commented out here are the only ones that will run on test code
There was a problem hiding this comment.
Why comment them out instead of removing them?
There was a problem hiding this comment.
I believe @algojack set it up that way so it was more clear what linters were being run on tests — this way you can see that gofmt, govet, and revive are the linters we want to run on tests
There was a problem hiding this comment.
i'm ok with deleting comments, just wanted to make sure that we didn't accidentally forget to ignore that excluded path on any linters. If we keep comments we can see that we enabled them there on purpose vs just forgetting to exclude them. Doesn't matter much.
winder
left a comment
There was a problem hiding this comment.
I'd remove the comments, other than that LGTM.
Summary
While reviewing #4149 I noticed a
%dwhere%sshould be and remembered we can enable go vet checks on custom logging functions by changing our linter settings. This fixes all the logging format string errors (in all files, going back before our configured new-from-rev commit) and enables the go vet configuration change.Test Plan
Code should be lint clean, only affects logging.