mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-21 16:40:52 +00:00
Resolve lint for unused parameter and unnecessary type arguments (#30750)
Resolve all cases for `unused parameter` and `unnecessary type arguments` Related: #30729 --------- Co-authored-by: Giteabot <teabot@gitea.io> (cherry picked from commit e80466f7349164ce4cf3c07bdac30d736d20f035) Conflicts: modules/markup/markdown/transform_codespan.go modules/setting/incoming_email.go routers/api/v1/admin/user_badge.go routers/private/hook_pre_receive.go tests/integration/repo_search_test.go resolved by discarding the change, this is linting only and for the sake of avoiding future conflicts
This commit is contained in:
parent
b8e7b3941a
commit
c504461b66
41 changed files with 107 additions and 129 deletions
|
@ -16,7 +16,6 @@ import (
|
|||
git_model "code.gitea.io/gitea/models/git"
|
||||
repo_model "code.gitea.io/gitea/models/repo"
|
||||
"code.gitea.io/gitea/models/unittest"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
"code.gitea.io/gitea/modules/git"
|
||||
"code.gitea.io/gitea/modules/graceful"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
|
@ -170,7 +169,6 @@ func TestCreateBranchInvalidCSRF(t *testing.T) {
|
|||
|
||||
func TestDatabaseMissingABranch(t *testing.T) {
|
||||
onGiteaRun(t, func(t *testing.T, URL *url.URL) {
|
||||
adminUser := unittest.AssertExistsAndLoadBean(t, &user_model.User{IsAdmin: true})
|
||||
session := loginUser(t, "user2")
|
||||
|
||||
// Create two branches
|
||||
|
@ -178,7 +176,7 @@ func TestDatabaseMissingABranch(t *testing.T) {
|
|||
testCreateBranch(t, session, "user2", "repo1", "branch/master", "will-be-missing", http.StatusSeeOther)
|
||||
|
||||
// Run the repo branch sync, to ensure the db and git agree.
|
||||
err2 := repo_service.AddAllRepoBranchesToSyncQueue(graceful.GetManager().ShutdownContext(), adminUser.ID)
|
||||
err2 := repo_service.AddAllRepoBranchesToSyncQueue(graceful.GetManager().ShutdownContext())
|
||||
assert.NoError(t, err2)
|
||||
|
||||
// Delete one branch from git only, leaving it in the database
|
||||
|
@ -197,7 +195,7 @@ func TestDatabaseMissingABranch(t *testing.T) {
|
|||
assert.GreaterOrEqual(t, firstBranchCount, 3)
|
||||
|
||||
// Run the repo branch sync again
|
||||
err2 = repo_service.AddAllRepoBranchesToSyncQueue(graceful.GetManager().ShutdownContext(), adminUser.ID)
|
||||
err2 = repo_service.AddAllRepoBranchesToSyncQueue(graceful.GetManager().ShutdownContext())
|
||||
assert.NoError(t, err2)
|
||||
|
||||
// Verify that loading the repo's branches page works still, and that it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue