Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367)

Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
This commit is contained in:
Renovate Bot 2025-03-28 22:22:21 +00:00 committed by forgejo-renovate-action
parent 51ff4970ec
commit fed2d81c44
427 changed files with 2043 additions and 2046 deletions

View file

@ -25,13 +25,13 @@ func testAPIGetBranch(t *testing.T, branchName string, exists bool) {
AddTokenAuth(token)
resp := MakeRequest(t, req, NoExpectedStatus)
if !exists {
assert.EqualValues(t, http.StatusNotFound, resp.Code)
assert.Equal(t, http.StatusNotFound, resp.Code)
return
}
assert.EqualValues(t, http.StatusOK, resp.Code)
assert.Equal(t, http.StatusOK, resp.Code)
var branch api.Branch
DecodeJSON(t, resp, &branch)
assert.EqualValues(t, branchName, branch.Name)
assert.Equal(t, branchName, branch.Name)
assert.True(t, branch.UserCanPush)
assert.True(t, branch.UserCanMerge)
}
@ -45,7 +45,7 @@ func testAPIGetBranchProtection(t *testing.T, branchName string, expectedHTTPSta
if resp.Code == http.StatusOK {
var branchProtection api.BranchProtection
DecodeJSON(t, resp, &branchProtection)
assert.EqualValues(t, branchName, branchProtection.RuleName)
assert.Equal(t, branchName, branchProtection.RuleName)
return &branchProtection
}
return nil
@ -61,7 +61,7 @@ func testAPICreateBranchProtection(t *testing.T, branchName string, expectedHTTP
if resp.Code == http.StatusCreated {
var branchProtection api.BranchProtection
DecodeJSON(t, resp, &branchProtection)
assert.EqualValues(t, branchName, branchProtection.RuleName)
assert.Equal(t, branchName, branchProtection.RuleName)
}
}
@ -74,7 +74,7 @@ func testAPIEditBranchProtection(t *testing.T, branchName string, body *api.Bran
if resp.Code == http.StatusOK {
var branchProtection api.BranchProtection
DecodeJSON(t, resp, &branchProtection)
assert.EqualValues(t, branchName, branchProtection.RuleName)
assert.Equal(t, branchName, branchProtection.RuleName)
}
}
@ -182,7 +182,7 @@ func testAPICreateBranch(t testing.TB, session *TestSession, user, repo, oldBran
DecodeJSON(t, resp, &branch)
if resp.Result().StatusCode == http.StatusCreated {
assert.EqualValues(t, newBranch, branch.Name)
assert.Equal(t, newBranch, branch.Name)
}
return resp.Result().StatusCode == status