diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-04-21 09:51:29 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-04-23 11:42:56 +0300 |
commit | 32b2226d515a2099f75ab2f7da062c8c6a09fa29 (patch) | |
tree | 68459727a6b3b7b10065c2f279e3287f3cf82bd6 /.golangci.yml | |
parent | d6b658f9a4bf92855c55cd4e2240b79942c13dbe (diff) |
golangci: Enable makezero linter
It's a common pitfall to create a slice with a prespecified length and
then append to it. If the initial length hasn't been set to zero, then
this pattern causes the first `n` entries to be the zero value of its
type. The makezero linter finds such patterns.
Enable the linter and fix the single violation it surfaces.
Diffstat (limited to '.golangci.yml')
-rw-r--r-- | .golangci.yml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/.golangci.yml b/.golangci.yml index 8239b4bed..ff8ee1fb7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -16,6 +16,7 @@ linters: - gosimple - govet - ineffassign + - makezero - megacheck - misspell - noctx |