File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,8 @@ linters:
54
54
- noctx # noctx finds sending http request without context.Context
55
55
- unconvert # Remove unnecessary type conversions
56
56
- wastedassign # wastedassign finds wasted assignment statements.
57
- - gomodguard # check for blocked dependencies
57
+ - depguard # check for blocked imports from Go files
58
+ - gomodguard # check for blocked imports from go.mod
58
59
- gomoddirectives
59
60
60
61
# all available settings of specific linters
@@ -88,9 +89,9 @@ linters-settings:
88
89
goimports :
89
90
local-prefixes : github.com/elastic
90
91
92
+ # Check for blocked dependencies in go.mod.
91
93
gomodguard :
92
94
blocked :
93
- # List of blocked modules.
94
95
modules :
95
96
# Blocked module.
96
97
- github.com/pkg/errors :
@@ -105,6 +106,15 @@ linters-settings:
105
106
- github.com/gofrs/uuid/v5
106
107
reason : " Use one uuid library consistently across the codebase"
107
108
109
+ # Check for blocked imports in Go files.
110
+ depguard :
111
+ rules :
112
+ main :
113
+ list-mode : lax
114
+ deny :
115
+ - pkg : " math/rand$"
116
+ desc : " superseded by math/rand/v2"
117
+
108
118
gomoddirectives :
109
119
# Forbid local `replace` directives
110
120
replace-local : false
You can’t perform that action at this time.
0 commit comments