Skip to content

Commit 8233085

Browse files
committed
review
1 parent 6f404f2 commit 8233085

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.golangci.reference.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,10 @@ linters-settings:
225225
threshold: 100
226226

227227
dupword:
228-
# Keywords for detecting duplicate words, only the words defined in this list will be detected.
228+
# Keywords for detecting duplicate words.
229+
# If this list is not empty, only the words defined in this list will be detected.
229230
# Default: []
230-
keyword:
231+
keywords:
231232
- "the"
232233
- "and"
233234
- "a"

pkg/config/linters_settings.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ type DuplSettings struct {
259259
}
260260

261261
type DupWordSettings struct {
262-
KeyWord []string `mapstructure:"keyword"`
262+
Keywords []string `mapstructure:"keywords"`
263263
}
264264

265265
type ErrcheckSettings struct {

pkg/golinters/dupword.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func NewDupWord(setting *config.DupWordSettings) *goanalysis.Linter {
1616
cfgMap := map[string]map[string]interface{}{}
1717
if setting != nil {
1818
cfgMap[a.Name] = map[string]interface{}{
19-
"keyword": strings.Join(setting.KeyWord, ","),
19+
"keyword": strings.Join(setting.Keywords, ","),
2020
}
2121
}
2222

0 commit comments

Comments
 (0)