@@ -10,42 +10,42 @@ import (
1010 "github.com/golangci/golangci-lint/pkg/goanalysis"
1111)
1212
13- func New (cfg * config.BiDiChkSettings ) * goanalysis.Linter {
13+ func New (settings * config.BiDiChkSettings ) * goanalysis.Linter {
1414 a := bidichk .NewAnalyzer ()
1515
16- cfgMap := map [string ]map [string ]any {}
17- if cfg != nil {
16+ cfg := map [string ]map [string ]any {}
17+ if settings != nil {
1818 var opts []string
1919
20- if cfg .LeftToRightEmbedding {
20+ if settings .LeftToRightEmbedding {
2121 opts = append (opts , "LEFT-TO-RIGHT-EMBEDDING" )
2222 }
23- if cfg .RightToLeftEmbedding {
23+ if settings .RightToLeftEmbedding {
2424 opts = append (opts , "RIGHT-TO-LEFT-EMBEDDING" )
2525 }
26- if cfg .PopDirectionalFormatting {
26+ if settings .PopDirectionalFormatting {
2727 opts = append (opts , "POP-DIRECTIONAL-FORMATTING" )
2828 }
29- if cfg .LeftToRightOverride {
29+ if settings .LeftToRightOverride {
3030 opts = append (opts , "LEFT-TO-RIGHT-OVERRIDE" )
3131 }
32- if cfg .RightToLeftOverride {
32+ if settings .RightToLeftOverride {
3333 opts = append (opts , "RIGHT-TO-LEFT-OVERRIDE" )
3434 }
35- if cfg .LeftToRightIsolate {
35+ if settings .LeftToRightIsolate {
3636 opts = append (opts , "LEFT-TO-RIGHT-ISOLATE" )
3737 }
38- if cfg .RightToLeftIsolate {
38+ if settings .RightToLeftIsolate {
3939 opts = append (opts , "RIGHT-TO-LEFT-ISOLATE" )
4040 }
41- if cfg .FirstStrongIsolate {
41+ if settings .FirstStrongIsolate {
4242 opts = append (opts , "FIRST-STRONG-ISOLATE" )
4343 }
44- if cfg .PopDirectionalIsolate {
44+ if settings .PopDirectionalIsolate {
4545 opts = append (opts , "POP-DIRECTIONAL-ISOLATE" )
4646 }
4747
48- cfgMap [a .Name ] = map [string ]any {
48+ cfg [a .Name ] = map [string ]any {
4949 "disallowed-runes" : strings .Join (opts , "," ),
5050 }
5151 }
@@ -54,6 +54,6 @@ func New(cfg *config.BiDiChkSettings) *goanalysis.Linter {
5454 a .Name ,
5555 "Checks for dangerous unicode character sequences" ,
5656 []* analysis.Analyzer {a },
57- cfgMap ,
57+ cfg ,
5858 ).WithLoadMode (goanalysis .LoadModeSyntax )
5959}
0 commit comments