File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ var defaultLintersSettings = LintersSettings{
6262 MaxDeclLines : 1 ,
6363 MaxDeclChars : 30 ,
6464 },
65+ InterfaceBloat : InterfaceBloatSettings {
66+ Max : 10 ,
67+ },
6568 Lll : LllSettings {
6669 LineLength : 120 ,
6770 TabWidth : 1 ,
Original file line number Diff line number Diff line change @@ -11,17 +11,19 @@ import (
1111func NewInterfaceBloat (settings * config.InterfaceBloatSettings ) * goanalysis.Linter {
1212 a := analyzer .New ()
1313
14- cfgMap := make ( map [string ]map [string ]interface {})
14+ var cfg map [string ]map [string ]interface {}
1515 if settings != nil {
16- cfgMap [a .Name ] = map [string ]interface {}{
17- analyzer .InterfaceMaxMethodsFlag : settings .Max ,
16+ cfg = map [string ]map [string ]interface {}{
17+ a .Name : {
18+ analyzer .InterfaceMaxMethodsFlag : settings .Max ,
19+ },
1820 }
1921 }
2022
2123 return goanalysis .NewLinter (
2224 a .Name ,
2325 a .Doc ,
2426 []* analysis.Analyzer {a },
25- nil ,
27+ cfg ,
2628 ).WithLoadMode (goanalysis .LoadModeSyntax )
2729}
You can’t perform that action at this time.
0 commit comments