File tree 2 files changed +10
-11
lines changed
2 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -52,14 +52,16 @@ linters-settings:
52
52
- strings.SplitN
53
53
54
54
govet :
55
- check-shadowing : true
56
55
settings :
57
56
printf :
58
57
funcs :
59
58
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
60
59
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
61
60
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
62
61
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
62
+ enable :
63
+ - nilness
64
+ - shadow
63
65
errorlint :
64
66
asserts : false
65
67
lll :
Original file line number Diff line number Diff line change @@ -236,25 +236,22 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
236
236
wrapcheckCfg = & m .cfg .LintersSettings .Wrapcheck
237
237
wslCfg = & m .cfg .LintersSettings .WSL
238
238
239
- if govetCfg != nil {
240
- govetCfg .Go = m .cfg .Run .Go
241
- }
239
+ govetCfg .Go = m .cfg .Run .Go
242
240
243
- if gocriticCfg != nil {
244
- gocriticCfg .Go = trimGoVersion (m .cfg .Run .Go )
245
- }
241
+ gocriticCfg .Go = trimGoVersion (m .cfg .Run .Go )
246
242
247
- if gofumptCfg != nil && gofumptCfg .LangVersion == "" {
243
+ if gofumptCfg .LangVersion == "" {
248
244
gofumptCfg .LangVersion = m .cfg .Run .Go
249
245
}
250
246
251
- if staticcheckCfg != nil && staticcheckCfg .GoVersion == "" {
247
+ // staticcheck related linters.
248
+ if staticcheckCfg .GoVersion == "" {
252
249
staticcheckCfg .GoVersion = trimGoVersion (m .cfg .Run .Go )
253
250
}
254
- if gosimpleCfg != nil && gosimpleCfg .GoVersion == "" {
251
+ if gosimpleCfg .GoVersion == "" {
255
252
gosimpleCfg .GoVersion = trimGoVersion (m .cfg .Run .Go )
256
253
}
257
- if stylecheckCfg != nil && stylecheckCfg .GoVersion != "" {
254
+ if stylecheckCfg .GoVersion != "" {
258
255
stylecheckCfg .GoVersion = trimGoVersion (m .cfg .Run .Go )
259
256
}
260
257
}
You can’t perform that action at this time.
0 commit comments