From 54d779a174bae056372cc5f41618bee7dd65b0c4 Mon Sep 17 00:00:00 2001 From: Denis Krivak Date: Sat, 7 Sep 2024 14:38:46 +0200 Subject: [PATCH] Fix linter issues. --- .golangci.yml | 9 ++++----- cmd/godot/main.go | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index ea380eb..b9e4435 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,9 +1,6 @@ run: concurrency: 2 - deadline: 5m - -skip-dirs: - - path: ./testdata/ + timeout: 5m linters: disable-all: true @@ -13,6 +10,7 @@ linters: - cyclop - dogsled - durationcheck + - err113 - errcheck - errname - errorlint @@ -25,7 +23,6 @@ linters: - gocritic - gocyclo - godot - - goerr113 - gofmt - gofumpt - goimports @@ -64,6 +61,8 @@ issues: exclude-use-default: false exclude: - "do not define dynamic errors, use wrapped static errors instead" + exclude-files: + - ./testdata/ exclude-rules: - path: _test\.go linters: diff --git a/cmd/godot/main.go b/cmd/godot/main.go index 1b9ac67..a900b5a 100644 --- a/cmd/godot/main.go +++ b/cmd/godot/main.go @@ -192,7 +192,7 @@ func findFiles(root string) chan string { go func() { defer close(out) - err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { + err := filepath.Walk(root, func(path string, info os.FileInfo, _ error) error { sep := string(filepath.Separator) if strings.HasPrefix(path, "vendor"+sep) || strings.Contains(path, sep+"vendor"+sep) { return nil