diff options
author | Pavlo Strokov <pstrokov@gitlab.com> | 2021-08-04 16:40:21 +0300 |
---|---|---|
committer | Pavlo Strokov <pstrokov@gitlab.com> | 2021-08-09 10:59:36 +0300 |
commit | fc6d12cda72720dbea2eed1976f6012661646b1f (patch) | |
tree | 468909042528200b33969cb6295beb01c567acb5 /.golangci.yml | |
parent | 631638faef0292271e674cefeb87cf3af60f4281 (diff) |
lint: Handle error returned by os.Remove
The change removes os.Remove from lint rules exclusion
and fixes all the places where it causes the issue.
If removal ends up with an error we try to log it if the
logger is accessible. Otherwise the error is just omitted.
We don't return it back to the caller because we don't want
functional changes here.
Diffstat (limited to '.golangci.yml')
-rw-r--r-- | .golangci.yml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.golangci.yml b/.golangci.yml index 4a0c9353b..9b8857d56 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -573,7 +573,7 @@ issues: text: "Error return value of `[^`]+.(Close|Serve)` is not checked" - linters: - errcheck - text: "Error return value of `(out\\.Flush|os\\.Remove)` is not checked" + text: "Error return value of `(out\\.Flush)` is not checked" ## errcheck: Specific issues in non-*_test.go files - linters: - errcheck |