diff --git a/.golangci.yml b/.golangci.yml index 32e98b97..d8922e69 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,11 +10,11 @@ linters-settings: simplify: true goimports: local-prefixes: github.com/mattermost/mattermost-plugin-autolink - golint: - min-confidence: 0 govet: check-shadowing: true enable-all: true + disable: + - fieldalignment misspell: locale: US @@ -22,27 +22,23 @@ linters: disable-all: true enable: - bodyclose - - deadcode - errcheck - goconst - gocritic - gofmt - goimports - - golint - gosec - gosimple - govet - ineffassign - - interfacer - misspell + - revive - nakedret - staticcheck - - structcheck - stylecheck - typecheck - unconvert - unused - - varcheck - whitespace issues: diff --git a/server/autolinkplugin/command.go b/server/autolinkplugin/command.go index 4561a33d..0aa1c4f0 100644 --- a/server/autolinkplugin/command.go +++ b/server/autolinkplugin/command.go @@ -337,7 +337,7 @@ func searchLinkRef(p *Plugin, requireUnique bool, args ...string) ([]autolink.Au n, err := strconv.ParseUint(args[0], 10, 32) if err == nil { if n < 1 || int(n) > len(links) { - return nil, nil, errors.Errorf("%v is not a valid link number.", n) + return nil, nil, errors.Errorf("%v is not a valid link number", n) } return links, []int{int(n) - 1}, nil } @@ -349,7 +349,7 @@ func searchLinkRef(p *Plugin, requireUnique bool, args ...string) ([]autolink.Au } } if len(found) == 0 { - return nil, nil, errors.Errorf("%q not found.", args[0]) + return nil, nil, errors.Errorf("%q not found", args[0]) } if requireUnique && len(found) > 1 { names := []string{} @@ -381,7 +381,7 @@ func searchLinkRefByTemplateOrPattern(p *Plugin, header *model.CommandArgs, args } if len(found) == 0 { - return nil, nil, errors.Errorf("%q not found.", value) + return nil, nil, errors.Errorf("%q not found", value) } return links, found, nil