gocognit: fix default threshold from 0 to 30

This commit is contained in:
Denis Isaev 2019-10-04 11:32:29 +03:00 committed by Trevor Pounds
parent fbbd24575f
commit 50cfc343c5

View File

@ -138,9 +138,6 @@ type LintersSettings struct {
Gocyclo struct { Gocyclo struct {
MinComplexity int `mapstructure:"min-complexity"` MinComplexity int `mapstructure:"min-complexity"`
} }
Gocognit struct {
MinComplexity int `mapstructure:"min-complexity"`
}
Varcheck struct { Varcheck struct {
CheckExportedFields bool `mapstructure:"exported-fields"` CheckExportedFields bool `mapstructure:"exported-fields"`
} }
@ -187,6 +184,7 @@ type LintersSettings struct {
Gocritic GocriticSettings Gocritic GocriticSettings
Godox GodoxSettings Godox GodoxSettings
Dogsled DogsledSettings Dogsled DogsledSettings
Gocognit GocognitSettings
} }
type GovetSettings struct { type GovetSettings struct {
@ -247,6 +245,10 @@ type DogsledSettings struct {
MaxBlankIdentifiers int `mapstructure:"max-blank-identifiers"` MaxBlankIdentifiers int `mapstructure:"max-blank-identifiers"`
} }
type GocognitSettings struct {
MinComplexity int `mapstructure:"min-complexity"`
}
var defaultLintersSettings = LintersSettings{ var defaultLintersSettings = LintersSettings{
Lll: LllSettings{ Lll: LllSettings{
LineLength: 120, LineLength: 120,
@ -272,6 +274,9 @@ var defaultLintersSettings = LintersSettings{
Dogsled: DogsledSettings{ Dogsled: DogsledSettings{
MaxBlankIdentifiers: 2, MaxBlankIdentifiers: 2,
}, },
Gocognit: GocognitSettings{
MinComplexity: 30,
},
} }
type Linters struct { type Linters struct {