Skip to content

Commit

Permalink
revive: enable rule to check for unhandled errors
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
phlogistonjohn committed Apr 9, 2020
1 parent dd46304 commit 175cba3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .revive.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 175cba3

Please sign in to comment.