Skip to content

Commit

Permalink
chore: update nolint directive requirements for golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lvlcn-t committed May 20, 2024
1 parent 2339ac9 commit c7708ee
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit c7708ee

Please sign in to comment.