File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -13,23 +13,18 @@ import (
1313func NewIreturn (settings * config.IreturnSettings ) * goanalysis.Linter {
1414 a := analyzer .NewAnalyzer ()
1515
16+ cfg := map [string ]map [string ]interface {}{}
17+ if settings != nil {
18+ cfg [a .Name ] = map [string ]interface {}{
19+ "allow" : strings .Join (settings .Allow , "," ),
20+ "reject" : strings .Join (settings .Reject , "," ),
21+ }
22+ }
23+
1624 return goanalysis .NewLinter (
1725 a .Name ,
1826 a .Doc ,
1927 []* analysis.Analyzer {a },
20- ireturnSettings ( a . Name , settings ) ,
28+ cfg ,
2129 ).WithLoadMode (goanalysis .LoadModeTypesInfo )
2230}
23-
24- func ireturnSettings (name string , s * config.IreturnSettings ) map [string ]map [string ]interface {} {
25- if s == nil {
26- return nil
27- }
28-
29- return map [string ]map [string ]interface {}{
30- name : {
31- "allow" : strings .Join (s .Allow , "," ),
32- "reject" : strings .Join (s .Reject , "," ),
33- },
34- }
35- }
You can’t perform that action at this time.
0 commit comments