chore(deps): upgrade golangci-lint to 1.51.0

This commit is contained in:
kolaente 2023-02-02 11:16:07 +01:00
parent 7b46446e03
commit fdbe110945
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
4 changed files with 6 additions and 28 deletions

View File

@ -141,7 +141,7 @@ steps:
commands:
- export "GOROOT=$(go env GOROOT)"
- apk --no-cache add build-base git
- wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
- wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.51.0
- ./mage-static check:all
when:
event: [ push, tag, pull_request ]
@ -731,6 +731,6 @@ steps:
- failure
---
kind: signature
hmac: 7260291345930ee08140f003435d089463ea995d319a3d002e70eb1aef58cd72
hmac: 69b4c4718d673e0a42c797b4882a73968c42318b8a249a8f9fd58d1c6aa9a636
...

View File

@ -88,3 +88,6 @@ issues:
- path: pkg/models/favorites\.go
linters:
- nilerr
- path: pkg/models/events\.go
linters:
- musttag

View File

@ -405,7 +405,7 @@ func checkGolangCiLintInstalled() {
mg.Deps(initVars)
if err := exec.Command("golangci-lint").Run(); err != nil && strings.Contains(err.Error(), "executable file not found") {
fmt.Println("Please manually install golangci-lint by running")
fmt.Println("curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.47.3")
fmt.Println("curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.51.0")
os.Exit(1)
}
}

View File

@ -49,31 +49,6 @@ var (
Password: "$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.",
Email: "user1@example.com",
}
testuser2 = user.User{
ID: 2,
Username: "user2",
Password: "$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.",
Email: "user2@example.com",
}
testuser3 = user.User{
ID: 3,
Username: "user3",
Password: "$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.",
Email: "user3@example.com",
}
testuser4 = user.User{
ID: 4,
Username: "user4",
Password: "$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.",
Email: "user4@example.com",
}
testuser5 = user.User{
ID: 4,
Username: "user5",
Password: "$2a$14$dcadBoMBL9jQoOcZK8Fju.cy0Ptx2oZECkKLnaa8ekRoTFe1w7To.",
Email: "user5@example.com",
Status: user.StatusDisabled,
}
)
func setupTestEnv() (e *echo.Echo, err error) {