gci: add missing custom-order setting (#3052)

This commit is contained in:
Dreamacro 2022-08-03 16:50:42 +08:00 committed by GitHub
parent 452544a2e7
commit 15cba447fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -287,6 +287,7 @@ type GciSettings struct {
LocalPrefixes string `mapstructure:"local-prefixes"` // Deprecated
Sections []string `mapstructure:"sections"`
SkipGenerated bool `mapstructure:"skip-generated"`
CustomOrder bool `mapstructure:"custom-order"`
}
type GocognitSettings struct {

View File

@ -37,6 +37,7 @@ func NewGci(settings *config.GciSettings) *goanalysis.Linter {
rawCfg := gcicfg.YamlConfig{
Cfg: gcicfg.BoolConfig{
SkipGenerated: settings.SkipGenerated,
CustomOrder: settings.CustomOrder,
},
SectionStrings: settings.Sections,
}