Skip to content

Commit

Permalink
Add linter rules to ensure we don't accidentally emit metrics directl…
Browse files Browse the repository at this point in the history
…y instead of through the compat package (#633)
  • Loading branch information
mkeeler authored Jan 9, 2025
1 parent 7650cd0 commit 8f99c15
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,25 @@ linters-settings:
check-shadowing: true
golint:
min-confidence: 0
depguard:
rules:
main:
list-mode: lax
allow:
- "github.com/hashicorp/go-metrics/compat"
deny:
- pkg: "github.com/hashicorp/go-metrics"
desc: not allowed, use github.com/hashicorp/go-metrics/compat instead
- pkg: "github.com/armon/go-metrics"
desc: not allowed, use github.com/hashicorp/go-metrics/compat instead

linters:
disable-all: true
enable:
- gofmt
#- golint
- govet
- depguard
#- varcheck
#- typecheck
#- gosimple
Expand Down

0 comments on commit 8f99c15

Please sign in to comment.