Skip to content

Commit

Permalink
depguard linter update to rule deny (#5285)
Browse files Browse the repository at this point in the history
Signed-off-by: gauron99 <[email protected]>
  • Loading branch information
gauron99 authored Dec 13, 2023
1 parent a2c21ec commit 6355aa0
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ linters:
- ineffassign
- staticcheck
- exportloopref
#- depguard #https://github.com/kedacore/keda/issues/4980
- depguard
- dogsled
- errcheck
#- funlen
Expand Down Expand Up @@ -136,6 +136,19 @@ issues:
- path: azure_pipelines_scaler.go
linters:
- gocritic
# Following 3 depguard exceptions are for disabling sync/atomic package where
# denying the rule doesnt help (bottom of this file) but this keeps the depguard
# linter enabled
# https://github.com/kedacore/keda/issues/4980
- path: pkg/scalers/external_mock_scaler.go
linters:
- depguard
- path: controllers/keda/scaledobject_controller_test.go
linters:
- depguard
- path: pkg/scalers/external_scaler_test.go
linters:
- depguard


linters-settings:
Expand All @@ -147,3 +160,9 @@ linters-settings:
- standard
- default
- prefix(github.com/kedacore/keda)
depguard: #https://github.com/kedacore/keda/issues/4980
rules:
main:
deny:
- pkg: sync/atomic
desc: "use type-safe atomics from go.uber.org/atomic"

0 comments on commit 6355aa0

Please sign in to comment.