Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Sep 15, 2022
1 parent 6f404f2 commit 8233085
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .golangci.reference.yml
Expand Up @@ -225,9 +225,10 @@ linters-settings:
threshold: 100

dupword:
# Keywords for detecting duplicate words, only the words defined in this list will be detected.
# Keywords for detecting duplicate words.
# If this list is not empty, only the words defined in this list will be detected.
# Default: []
keyword:
keywords:
- "the"
- "and"
- "a"
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/linters_settings.go
Expand Up @@ -259,7 +259,7 @@ type DuplSettings struct {
}

type DupWordSettings struct {
KeyWord []string `mapstructure:"keyword"`
Keywords []string `mapstructure:"keywords"`
}

type ErrcheckSettings struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/golinters/dupword.go
Expand Up @@ -16,7 +16,7 @@ func NewDupWord(setting *config.DupWordSettings) *goanalysis.Linter {
cfgMap := map[string]map[string]interface{}{}
if setting != nil {
cfgMap[a.Name] = map[string]interface{}{
"keyword": strings.Join(setting.KeyWord, ","),
"keyword": strings.Join(setting.Keywords, ","),
}
}

Expand Down

0 comments on commit 8233085

Please sign in to comment.