Skip to content

Commit b9bd126

Browse files
committed
misspell: set ignore-words to lowercase
1 parent 28f0560 commit b9bd126

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

pkg/golinters/misspell.go

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

9797
if len(settings.IgnoreWords) != 0 {
98-
replacer.RemoveRule(settings.IgnoreWords)
98+
var ignoreWords []string
99+
for _, word := range settings.IgnoreWords {
100+
ignoreWords = append(ignoreWords, strings.ToLower(word))
101+
}
102+
replacer.RemoveRule(ignoreWords)
99103
}
100104

101105
// It can panic.

test/testdata/configs/misspell.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
linters-settings:
22
misspell:
3+
locale: US
34
ignore-words:
45
- langauge
6+
- Dialogue

test/testdata/misspell.go

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ func Misspell() {
77
}
88

99
// the word langauge should be ignored here: it's set in config
10+
// the word Dialogue should be ignored here: it's set in config

0 commit comments

Comments
 (0)