Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ type LintersSettings struct {
Gocyclo struct {
MinComplexity int `mapstructure:"min-complexity"`
}
Gocognit struct {
MinComplexity int `mapstructure:"min-complexity"`
}
Varcheck struct {
CheckExportedFields bool `mapstructure:"exported-fields"`
}
Expand Down Expand Up @@ -186,6 +183,7 @@ type LintersSettings struct {
Gocritic GocriticSettings
Godox GodoxSettings
Dogsled DogsledSettings
Gocognit GocognitSettings
}

type GovetSettings struct {
Expand Down Expand Up @@ -246,6 +244,10 @@ type DogsledSettings struct {
MaxBlankIdentifiers int `mapstructure:"max-blank-identifiers"`
}

type GocognitSettings struct {
MinComplexity int `mapstructure:"min-complexity"`
}

var defaultLintersSettings = LintersSettings{
Lll: LllSettings{
LineLength: 120,
Expand All @@ -271,6 +273,9 @@ var defaultLintersSettings = LintersSettings{
Dogsled: DogsledSettings{
MaxBlankIdentifiers: 2,
},
Gocognit: GocognitSettings{
MinComplexity: 30,
},
}

type Linters struct {
Expand Down