diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-04-21 09:41:26 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-04-23 11:42:56 +0300 |
commit | d6b658f9a4bf92855c55cd4e2240b79942c13dbe (patch) | |
tree | 7b7f2c57ccf8197b7c9d30d8068f98aa147a482e /.golangci.yml | |
parent | 99cf654a47e6ffa1d8827060a3fe5772c7f6320f (diff) |
golangci: Enable wastedassign linter
The wastedassign linter will check whether a newly assigned variable is
used in any code path after its assignment. This seems like a useful
check to have, e.g. to not forget checking a reassigned error value.
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 7ce33a0d0..8239b4bed 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -28,6 +28,7 @@ linters: - unconvert - unused - varcheck + - wastedassign issues: exclude-use-default: false |