File tree Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Expand file tree Collapse file tree 1 file changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -21,17 +21,25 @@ linters:
21
21
22
22
linters-settings :
23
23
depguard :
24
- include-go-root : true
25
- packages-with-error-message :
26
- - io/ioutil : >
27
- Use the "io" and "os" packages instead.
28
- See https://go.dev/doc/go1.16#ioutil
24
+ rules :
25
+ everything :
26
+ deny :
27
+ - pkg : io/ioutil
28
+ desc : >
29
+ Use the "io" and "os" packages instead.
30
+ See https://go.dev/doc/go1.16#ioutil
29
31
30
- - net/http/httptest : Should be used only in tests.
31
- - testing/* : The "testing" packages should be used only in tests.
32
+ not-tests :
33
+ files : ['!$test']
34
+ deny :
35
+ - pkg : net/http/httptest
36
+ desc : Should be used only in tests.
32
37
33
- - github.com/crunchydata/postgres-operator/internal/testing/* : >
34
- The "internal/testing" packages should be used only in tests.
38
+ - pkg : testing/*
39
+ desc : The "testing" packages should be used only in tests.
40
+
41
+ - pkg : github.com/crunchydata/postgres-operator/internal/testing/*
42
+ desc : The "internal/testing" packages should be used only in tests.
35
43
36
44
exhaustive :
37
45
default-signifies-exhaustive : true
@@ -60,14 +68,6 @@ linters-settings:
60
68
alias : apierrors
61
69
no-unaliased : true
62
70
63
- issues :
64
- exclude-rules :
65
- # These testing packages are allowed in test files. The packages are
66
- # disallowed everywhere then ignored here because that is how depguard works.
67
- - linters : [depguard]
68
- path : _test[.]go$
69
- text : \`(net/http/httptest|[^`]*testing[^`]*)`
70
-
71
71
run :
72
72
build-tags :
73
73
- envtest
You can’t perform that action at this time.
0 commit comments