From c7708eee9e5183d70b541a9aba10350acf3029c5 Mon Sep 17 00:00:00 2001 From: lvlcn-t <75443136+lvlcn-t@users.noreply.github.com> Date: Mon, 20 May 2024 22:35:14 +0200 Subject: [PATCH] chore: update nolint directive requirements for golangci-lint --- .golangci.yaml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index 7feb9db..bafa6d9 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,14 +1,13 @@ # yaml-language-server: $schema=https://golangci-lint.run/jsonschema/golangci.jsonschema.json linters-settings: depguard: - # new configuration rules: logger: deny: - # logging is allowed only by logutils.Log, - # logrus is allowed to use only in logutils package. - pkg: "github.com/sirupsen/logrus" - desc: logging is allowed only by logutils.Log + desc: use the standard library's slog.Logger instead + - pkg: "github.com/ueber-go/zap" + desc: use the standard library's slog.Logger instead dupl: threshold: 100 funlen: @@ -71,7 +70,7 @@ linters-settings: nolintlint: allow-unused: false # report any unused nolint directives require-explanation: false # don't require an explanation for nolint directives - require-specific: false # don't require nolint directives to be specific about which linter is being skipped + require-specific: true # require nolint directives to be specific about which linter is being skipped revive: rules: - name: unexported-return @@ -133,10 +132,9 @@ linters: issues: # Excluding configuration per-path, per-linter, per-text and per-source exclude-dirs: - - test/testdata_etc # test files - - internal/cache # extracted from Go code - - internal/renameio # extracted from Go code - - internal/robustio # extracted from Go code + - test/data # test files + - test/testdata # test files + - internal/cache # internal package exclude-rules: - path: _test\.go linters: