From 4f1fabb4556cf3faadadc209ccc98b4fbf4507bb Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 30 Sep 2023 13:22:34 +0200 Subject: [PATCH] Update linter config, fix linter error Signed-off-by: Knut Ahlers --- .golangci.yml | 5 ----- main.go | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 23e47f8..e4d0cf1 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -29,7 +29,6 @@ linters: - bodyclose # checks whether HTTP response body is closed successfully [fast: true, auto-fix: false] - containedctx # containedctx is a linter that detects struct contained context.Context field [fast: true, auto-fix: false] - contextcheck # check the function whether use a non-inherited context [fast: false, auto-fix: false] - - depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: true, auto-fix: false] - dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f()) [fast: true, auto-fix: false] - durationcheck # check for two durations multiplied together [fast: false, auto-fix: false] - errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases [fast: false, auto-fix: false] @@ -67,10 +66,6 @@ linters: - wrapcheck # Checks that errors returned from external packages are wrapped [fast: false, auto-fix: false] linters-settings: - forbidigo: - forbid: - - 'fmt\.Errorf' # Should use github.com/pkg/errors - funlen: lines: 100 statements: 60 diff --git a/main.go b/main.go index b5b9736..50fa7da 100644 --- a/main.go +++ b/main.go @@ -61,7 +61,7 @@ func main() { } if cfg.VersionAndExit { - fmt.Printf("go-latestver %s\n", version) + fmt.Printf("go-latestver %s\n", version) //nolint:forbidigo os.Exit(0) }