Add Golangci Lint (#676)
Increase golangci timeout Fix installing golangci-lint in ci Remove mage targets replaced by golangci Run golint in ci Add goheader linter Enable & fix more linters Fix lint issues Add mage target to automagically fix issues found by golangci golangci-lint run --fix Add golangci config Add golangci mage target Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/676 Co-Authored-By: konrad <konrad@kola-entertainments.de> Co-Committed-By: konrad <konrad@kola-entertainments.de>
This commit is contained in:
@ -17,12 +17,13 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"code.vikunja.io/api/pkg/files"
|
||||
"code.vikunja.io/api/pkg/metrics"
|
||||
"code.vikunja.io/api/pkg/user"
|
||||
"code.vikunja.io/web"
|
||||
"strings"
|
||||
"time"
|
||||
"xorm.io/builder"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
@ -450,7 +451,7 @@ func GenerateListIdentifier(l *List, sess *xorm.Engine) (err error) {
|
||||
// The general idea here is to take the title and slice it into pieces, until we found a unique piece.
|
||||
|
||||
var exists = true
|
||||
titleSlug := []rune(strings.Replace(strings.ToUpper(l.Title), " ", "", -1))
|
||||
titleSlug := []rune(strings.ReplaceAll(strings.ToUpper(l.Title), " ", ""))
|
||||
|
||||
// We can save at most 10 characters in the db, so we need to ensure it has at most 10 characters
|
||||
if len(titleSlug) > 10 {
|
||||
|
Reference in New Issue
Block a user