Skip to content

Commit

Permalink
chore: add linter that catches math/rand imports (#42513)
Browse files Browse the repository at this point in the history
  • Loading branch information
mauri870 authored Feb 5, 2025
1 parent 71900c4 commit 8cb39a0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,19 @@ linters:
- noctx # noctx finds sending http request without context.Context
- unconvert # Remove unnecessary type conversions
- wastedassign # wastedassign finds wasted assignment statements.
- gomodguard # check for blocked dependencies
- depguard
- gomodguard # check for blocked dependencies in go.mod
- depguard # check for blocked dependencies in Go files
- gomoddirectives

# all available settings of specific linters
linters-settings:
depguard:
rules:
main:
list-mode: lax
deny:
- pkg: "math/rand$"
desc: "superseded by math/rand/v2"
apache-licensed-code:
list-mode: lax
files:
Expand Down

0 comments on commit 8cb39a0

Please sign in to comment.