From 175cba33882d378b91f7ad253634b355d6e72a51 Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Wed, 8 Apr 2020 17:03:22 -0400 Subject: [PATCH] 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 --- .revive.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.revive.toml b/.revive.toml index 450917e..b7388ea 100644 --- a/.revive.toml +++ b/.revive.toml @@ -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"]