Skip to content

Commit

Permalink
Enable depguard check to avoid using sync/atomic (open-telemetry#9812)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu committed May 10, 2022
1 parent 901e67f commit adc844a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,16 @@ linters-settings:
revive:
# minimal confidence for issues, default is 0.8
min-confidence: 0.8

gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true

goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/open-telemetry/opentelemetry-collector-contrib

misspell:
# Correct spellings using locale preferences for US or UK.
# Default is to use a neutral variety of English.
Expand All @@ -93,6 +96,13 @@ linters-settings:
- kilometre
- kilometres

depguard:
list-type: denylist
include-go-root: true
packages-with-error-message:
# See https://github.com/open-telemetry/opentelemetry-collector/issues/5200 for rationale
- sync/atomic: "Use go.uber.org/atomic instead of sync/atomic"

linters:
enable:
- exportloopref
Expand Down

0 comments on commit adc844a

Please sign in to comment.