diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-01-04 14:32:01 +0300 |
---|---|---|
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-01-18 16:06:00 +0300 |
commit | 1518a145e8e064a3f720f0ff03a1f368759687db (patch) | |
tree | 13a408ff852b93ac85d15341d4efb858f9caca03 | |
parent | 33b821fa6920c093007ffb7fd99fbdb911b75990 (diff) |
golangci: whitelist more common *.Close patterns
Widen the regexp in my 224e7ecb9 (golangci: whitelist common test
patterns, 2020-12-24) to whitelist a few more things, as suggested in
https://gitlab.com/gitlab-org/gitaly/-/merge_requests/2962#note_475118299
I'm not just whitelisting any *.Close() as before since that's likely
to catch some false positives. Instead I'm focusing on the common
"defer" patterns.
Before this we'd emit 617 warnings, now we'll emit 603, of those
the *_test.go files went from 425 to 411, so this change only targets
the test suite.
-rw-r--r-- | .golangci.yml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.golangci.yml b/.golangci.yml index 0ae6d190e..e505c78a5 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -49,7 +49,7 @@ issues: - linters: - errcheck path: "_test.go" - text: "Error return value of `conns?.Close` is not checked" + text: "Error return value of `(cc|con(ns?)?|db|closer|lis(tener)?).Close` is not checked" - linters: - golint path: "_test.go" |