Skip to content

Commit

Permalink
.golangci.yml: update rules
Browse files Browse the repository at this point in the history
  • Loading branch information
jmank88 committed Aug 21, 2024
1 parent fd6e1f3 commit 1c5b30b
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ linters:
- whitespace
- depguard
- containedctx
- fatcontext
- mirror
- loggercheck
linters-settings:
exhaustive:
default-signifies-exhaustive: true
Expand All @@ -31,8 +34,21 @@ linters-settings:
# - G304
# - G404
govet:
# report about shadowed variables
check-shadowing: true
enable:
- shadow
settings:
printf:
# Additionally check custom logger
funcs:
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Debugf
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Infof
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Warnf
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Errorf
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Panicf
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Fatalf
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).AssumptionViolationf
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Tracef
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Criticalf
errorlint:
# Allow formatting of errors without %w
errorf: false
Expand Down Expand Up @@ -111,6 +127,21 @@ linters-settings:
desc: Use gopkg.in/guregu/null.v4 instead
- pkg: "gopkg.in/guregu/null.v3"
desc: Use gopkg.in/guregu/null.v4 instead
- pkg: github.com/go-gorm/gorm
desc: Use github.com/jmoiron/sqlx directly instead
loggercheck:
# Check that *w logging functions have even number of args (i.e., well formed key-value pairs).
rules:
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Debugw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Infow
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Warnw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Errorw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Panicw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.Logger).Fatalw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).AssumptionViolationw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Tracew
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).Criticalw
- (github.com/smartcontractkit/chainlink-common/pkg/logger.SugaredLogger).With
issues:
exclude-rules:
- path: test
Expand Down

0 comments on commit 1c5b30b

Please sign in to comment.