Skip to content

Commit

Permalink
Add forbidigo rules
Browse files Browse the repository at this point in the history
  • Loading branch information
codingllama committed Feb 11, 2025
1 parent 6887cbe commit 0ca6c20
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ issues:
- linters: [testifylint]
text: "suite-thelper: suite helper method must start with"
path: 'integrations/.+'
# lib/utils/aws/ subpackages are allowed to use AWS SDK constructors.
- path: lib/utils/aws/stsutils/sts.go
linters: [forbidigo]
text: 'sts.NewFromConfig'
- path: lib/utils/aws/stsutils/sts_v1.go
linters: [forbidigo]
text: 'sts.New'
# TODO(codingllama): Remove once e/ is updated.
- path: e/lib/cloud/aws/aws.go
linters: [forbidigo]
text: 'sts.NewFromConfig'
exclude-use-default: true
max-same-issues: 0
max-issues-per-linter: 0
Expand All @@ -34,6 +45,7 @@ linters:
enable:
- bodyclose
- depguard
- forbidigo
- gci
- goimports
- gosimple
Expand Down Expand Up @@ -146,6 +158,12 @@ linters-settings:
- len
- suite-extra-assert-call
- suite-thelper
forbidigo:
forbid:
- p: '^sts\.NewFromConfig$'
msg: 'Use stsutils.NewFromConfig'
- p: '^sts\.New$'
msg: 'Use stsutils.NewV1'

run:
go: '1.22'
Expand Down

0 comments on commit 0ca6c20

Please sign in to comment.