You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For excluded functions, there is no need to simulate handling error by using _ := function1(...), or _, _ := function2(...).
Remove blank identifiers for such cases (to find them something like this can be used: grep -nr '_, _ = (\w\+\.)\+Write' * ).
Additional info
Also, it would be good to handle errors properly for cases when blank identifier is used for non-excluded functions.
This configuration can find such cases:
linters-settings:
errcheck:
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`.
# Such cases aren't reported by default.
# Default: false
check-blank: true
The text was updated successfully, but these errors were encountered:
Use Case
errcheck
linter has default exclusion list (which can be extended in.golangci.yml
)https://github.com/kisielk/errcheck/blob/master/errcheck/excludes.go#L11
Expected behavior
For excluded functions, there is no need to simulate handling
error
by using_ := function1(...)
, or_, _ := function2(...)
.Remove blank identifiers for such cases (to find them something like this can be used:
grep -nr '_, _ = (\w\+\.)\+Write' *
).Additional info
Also, it would be good to handle errors properly for cases when blank identifier is used for non-excluded functions.
This configuration can find such cases:
The text was updated successfully, but these errors were encountered: