File tree 6 files changed +8
-50
lines changed 6 files changed +8
-50
lines changed Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ require (
113
113
github.com/ykadowak/zerologlint v0.1.1
114
114
gitlab.com/bosi/decorder v0.2.3
115
115
go.tmz.dev/musttag v0.6.1
116
+ golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
116
117
golang.org/x/tools v0.8.0
117
118
gopkg.in/yaml.v3 v3.0.1
118
119
honnef.co/go/tools v0.4.3
@@ -182,7 +183,6 @@ require (
182
183
go.uber.org/atomic v1.7.0 // indirect
183
184
go.uber.org/multierr v1.6.0 // indirect
184
185
go.uber.org/zap v1.24.0 // indirect
185
- golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
186
186
golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect
187
187
golang.org/x/mod v0.10.0 // indirect
188
188
golang.org/x/sync v0.1.0 // indirect
Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ import (
9
9
10
10
"github.com/mitchellh/go-homedir"
11
11
"github.com/spf13/viper"
12
+ "golang.org/x/exp/slices"
12
13
13
14
"github.com/golangci/golangci-lint/pkg/exitcodes"
14
15
"github.com/golangci/golangci-lint/pkg/fsutils"
15
16
"github.com/golangci/golangci-lint/pkg/logutils"
16
- "github.com/golangci/golangci-lint/pkg/sliceutil"
17
17
)
18
18
19
19
type FileReader struct {
@@ -203,7 +203,7 @@ func (r *FileReader) setupConfigFileSearch() {
203
203
// find home directory for global config
204
204
if home , err := homedir .Dir (); err != nil {
205
205
r .log .Warnf ("Can't get user's home directory: %s" , err .Error ())
206
- } else if ! sliceutil .Contains (configSearchPaths , home ) {
206
+ } else if ! slices .Contains (configSearchPaths , home ) {
207
207
configSearchPaths = append (configSearchPaths , home )
208
208
}
209
209
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 6
6
"strings"
7
7
"testing"
8
8
9
+ "golang.org/x/exp/slices"
10
+
9
11
"github.com/golangci/golangci-lint/pkg/lint/lintersdb"
10
12
"github.com/golangci/golangci-lint/test/testshared"
11
13
)
@@ -134,16 +136,6 @@ func TestEnabledLinters(t *testing.T) {
134
136
}
135
137
}
136
138
137
- func inSlice (s []string , v string ) bool {
138
- for _ , sv := range s {
139
- if sv == v {
140
- return true
141
- }
142
- }
143
-
144
- return false
145
- }
146
-
147
139
func getEnabledByDefaultFastLintersExcept (except ... string ) []string {
148
140
m := lintersdb .NewManager (nil , nil )
149
141
ebdl := m .GetAllEnabledByDefaultLinters ()
@@ -153,7 +145,7 @@ func getEnabledByDefaultFastLintersExcept(except ...string) []string {
153
145
continue
154
146
}
155
147
156
- if ! inSlice (except , lc .Name ()) {
148
+ if ! slices . Contains (except , lc .Name ()) {
157
149
ret = append (ret , lc .Name ())
158
150
}
159
151
}
You can’t perform that action at this time.
0 commit comments