Skip to content

Commit 679bcb0

Browse files
committed
chore: rename local variable to reduce ambiguity
1 parent ccdc9a7 commit 679bcb0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pkg/config/linters_settings.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,8 @@ type MalignedSettings struct {
609609
}
610610

611611
type MisspellSettings struct {
612-
Locale string
612+
Locale string
613+
// TODO(ldez): v2 the options must be renamed to `IgnoredRules`.
613614
IgnoreWords []string `mapstructure:"ignore-words"`
614615
}
615616

pkg/golinters/misspell.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ func createMisspellReplacer(settings *config.MisspellSettings) (*misspell.Replac
9595
}
9696

9797
if len(settings.IgnoreWords) != 0 {
98-
var ignoreWords []string
98+
var ignoredRules []string
9999
for _, word := range settings.IgnoreWords {
100-
ignoreWords = append(ignoreWords, strings.ToLower(word))
100+
ignoredRules = append(ignoredRules, strings.ToLower(word))
101101
}
102-
replacer.RemoveRule(ignoreWords)
102+
replacer.RemoveRule(ignoredRules)
103103
}
104104

105105
// It can panic.

0 commit comments

Comments
 (0)