build(deps): bump github.com/Abirdcfly/dupword from 0.0.12 to 0.0.13 (#4104)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
parent
c9956e8e73
commit
95edd30b41
@ -235,9 +235,13 @@ linters-settings:
|
||||
# If this list is not empty, only the words defined in this list will be detected.
|
||||
# Default: []
|
||||
keywords:
|
||||
- "the"
|
||||
- "and"
|
||||
- "a"
|
||||
- "the"
|
||||
- "and"
|
||||
- "a"
|
||||
# Keywords used to ignore detection.
|
||||
# Default: []
|
||||
ignore:
|
||||
- "0C0C"
|
||||
|
||||
errcheck:
|
||||
# Report about not checking of errors in type assertions: `a := b.(MyStruct)`.
|
||||
|
2
go.mod
2
go.mod
@ -6,7 +6,7 @@ require (
|
||||
4d63.com/gocheckcompilerdirectives v1.2.1
|
||||
4d63.com/gochecknoglobals v0.2.1
|
||||
github.com/4meepo/tagalign v1.3.2
|
||||
github.com/Abirdcfly/dupword v0.0.12
|
||||
github.com/Abirdcfly/dupword v0.0.13
|
||||
github.com/Antonboom/errname v0.1.12
|
||||
github.com/Antonboom/nilnil v0.1.7
|
||||
github.com/BurntSushi/toml v1.3.2
|
||||
|
4
go.sum
generated
4
go.sum
generated
@ -42,8 +42,8 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f
|
||||
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
|
||||
github.com/4meepo/tagalign v1.3.2 h1:1idD3yxlRGV18VjqtDbqYvQ5pXqQS0wO2dn6M3XstvI=
|
||||
github.com/4meepo/tagalign v1.3.2/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE=
|
||||
github.com/Abirdcfly/dupword v0.0.12 h1:56NnOyrXzChj07BDFjeRA+IUzSz01jmzEq+G4kEgFhc=
|
||||
github.com/Abirdcfly/dupword v0.0.12/go.mod h1:+us/TGct/nI9Ndcbcp3rgNcQzctTj68pq7TcgNpLfdI=
|
||||
github.com/Abirdcfly/dupword v0.0.13 h1:SMS17YXypwP000fA7Lr+kfyBQyW14tTT+nRv9ASwUUo=
|
||||
github.com/Abirdcfly/dupword v0.0.13/go.mod h1:Ut6Ue2KgF/kCOawpW4LnExT+xZLQviJPE4klBPMK/5Y=
|
||||
github.com/Antonboom/errname v0.1.12 h1:oh9ak2zUtsLp5oaEd/erjB4GPu9w19NyoIskZClDcQY=
|
||||
github.com/Antonboom/errname v0.1.12/go.mod h1:bK7todrzvlaZoQagP1orKzWXv59X/x0W0Io2XT1Ssro=
|
||||
github.com/Antonboom/nilnil v0.1.7 h1:ofgL+BA7vlA1K2wNQOsHzLJ2Pw5B5DpWRLdDAVvvTow=
|
||||
|
@ -292,6 +292,7 @@ type DuplSettings struct {
|
||||
|
||||
type DupWordSettings struct {
|
||||
Keywords []string `mapstructure:"keywords"`
|
||||
Ignore []string `mapstructure:"ignore"`
|
||||
}
|
||||
|
||||
type ErrcheckSettings struct {
|
||||
|
@ -17,6 +17,7 @@ func NewDupWord(setting *config.DupWordSettings) *goanalysis.Linter {
|
||||
if setting != nil {
|
||||
cfgMap[a.Name] = map[string]any{
|
||||
"keyword": strings.Join(setting.Keywords, ","),
|
||||
"ignore": strings.Join(setting.Ignore, ","),
|
||||
}
|
||||
}
|
||||
|
||||
|
4
test/testdata/configs/dupword_ignore_the.yml
vendored
Normal file
4
test/testdata/configs/dupword_ignore_the.yml
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
linters-settings:
|
||||
dupword:
|
||||
ignore:
|
||||
- "the"
|
16
test/testdata/dupword_ignore_the.go
vendored
Normal file
16
test/testdata/dupword_ignore_the.go
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
//golangcitest:args -Edupword
|
||||
//golangcitest:config_path testdata/configs/dupword_ignore_the.yml
|
||||
package testdata
|
||||
|
||||
import "fmt"
|
||||
|
||||
func duplicateWordInComments() {
|
||||
// this line include duplicated word the the
|
||||
fmt.Println("hello")
|
||||
}
|
||||
|
||||
func duplicateWordInStr() {
|
||||
a := "this line include duplicate word and and" // want `Duplicate words \(and\) found`
|
||||
b := "print the\n the line, print the the \n\t the line. and and" // want `Duplicate words \(and\) found`
|
||||
fmt.Println(a, b)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user