From 9bdc5e1dd9b23475f9664e15163636ce4a7a6c3e Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 12 May 2024 11:08:29 +0200 Subject: [PATCH] ci: fix golangci-lint deprecations --- .golangci.yml | 5 ++--- app/commands/changelog.go | 2 +- sv/message.go | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 4c850f7..f0845ae 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -23,7 +23,6 @@ linters: - errchkjson - errname - errorlint - - execinquery # - exhaustive - exportloopref - forcetypeassert @@ -37,12 +36,12 @@ linters: - gocyclo - godot # - godox - - goerr113 + - err113 - gofmt - gofumpt - goheader - goimports - - gomnd + - mnd - gomoddirectives - gomodguard - goprintffuncname diff --git a/app/commands/changelog.go b/app/commands/changelog.go index a786569..dde674a 100644 --- a/app/commands/changelog.go +++ b/app/commands/changelog.go @@ -14,7 +14,7 @@ func ChangelogFlags(settings *app.ChangelogSettings) []cli.Flag { return []cli.Flag{ &cli.IntFlag{ Name: "size", - Value: 10, //nolint:gomnd + Value: 10, //nolint:mnd Aliases: []string{"n"}, Destination: &settings.Size, Usage: "get changelog from last 'n' tags", diff --git a/sv/message.go b/sv/message.go index 483a9e5..022ef1b 100644 --- a/sv/message.go +++ b/sv/message.go @@ -249,7 +249,7 @@ func (p BaseMessageProcessor) IssueID(branch string) (string, error) { } groups := r.FindStringSubmatch(branch) - if len(groups) != 4 { //nolint:gomnd + if len(groups) != 4 { //nolint:mnd return "", nil } @@ -360,7 +360,7 @@ func parseSubjectMessage(message string) (string, string, string, bool) { regex := regexp.MustCompile(`([a-z]+)(\((.*)\))?(!)?: (.*)`) result := regex.FindStringSubmatch(message) - if len(result) != 6 { //nolint:gomnd + if len(result) != 6 { //nolint:mnd return "", "", message, false } @@ -375,7 +375,7 @@ func extractFooterMetadata(key, text string, useHash bool) string { } result := regex.FindStringSubmatch(text) - if len(result) < 2 { //nolint:gomnd + if len(result) < 2 { //nolint:mnd return "" }