0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-21 01:50:40 +00:00

ci: fix golangci-lint deprecations

This commit is contained in:
Robert Kaussow 2024-05-12 11:08:29 +02:00
parent c4d961209a
commit 9bdc5e1dd9
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 6 additions and 7 deletions

View File

@ -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

View File

@ -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",

View File

@ -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 ""
}