File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ var defaultLintersSettings = LintersSettings{
62
62
MaxDeclLines : 1 ,
63
63
MaxDeclChars : 30 ,
64
64
},
65
+ InterfaceBloat : InterfaceBloatSettings {
66
+ Max : 10 ,
67
+ },
65
68
Lll : LllSettings {
66
69
LineLength : 120 ,
67
70
TabWidth : 1 ,
Original file line number Diff line number Diff line change @@ -11,17 +11,19 @@ import (
11
11
func NewInterfaceBloat (settings * config.InterfaceBloatSettings ) * goanalysis.Linter {
12
12
a := analyzer .New ()
13
13
14
- cfgMap := make ( map [string ]map [string ]interface {})
14
+ var cfg map [string ]map [string ]interface {}
15
15
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
+ },
18
20
}
19
21
}
20
22
21
23
return goanalysis .NewLinter (
22
24
a .Name ,
23
25
a .Doc ,
24
26
[]* analysis.Analyzer {a },
25
- nil ,
27
+ cfg ,
26
28
).WithLoadMode (goanalysis .LoadModeSyntax )
27
29
}
You can’t perform that action at this time.
0 commit comments