revive: enable rule to check for unhandled errors

Enable the revive rule to ensure we check the return values of various
function calls. Put common printing functions in the skip list of the
check, because no-one ever checks the error of those. :-)

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2020-04-08 17:03:22 -04:00 committed by John Mulligan
parent dd46304a07
commit 175cba3388

View File

@ -42,3 +42,7 @@ warningCode = 0
arguments = [7]
[rule.function-result-limit]
arguments = [3]
[rule.unhandled-error]
# functions to ignore unhandled errors on
arguments = ["fmt.Printf", "fmt.Println"]