File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ linters:
75
75
desc : Use "go.opentelemetry.io/otel/semconv/v1.27.0" instead.
76
76
- pkg : io/ioutil
77
77
desc : Use the "io" and "os" packages instead. See https://go.dev/doc/go1.16#ioutil
78
+ - pkg : math/rand$
79
+ desc : Use the "math/rand/v2" package instead. See https://go.dev/doc/go1.22#math_rand_v2
78
80
not-tests :
79
81
files : ['!$test','!**/internal/testing/**']
80
82
list-mode : lax
@@ -139,6 +141,11 @@ linters:
139
141
- legacy
140
142
- std-error-handling
141
143
rules :
144
+ # It is fine for tests to use "math/rand" packages.
145
+ - linters : [gosec]
146
+ path : ' (.+)_test[.]go'
147
+ text : weak random number generator
148
+
142
149
# This internal package is the one place we want to do API discovery.
143
150
- linters : [depguard]
144
151
path : internal/kubernetes/discovery.go
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ package pgbackrest
6
6
7
7
import (
8
8
"io"
9
- "math/rand"
9
+ "math/rand/v2 "
10
10
"strconv"
11
11
"testing"
12
12
You can’t perform that action at this time.
0 commit comments