1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Update golangci-lint to v1.62.2, fix issues (#32845)

Update it and fix new issues related to `redefines-builtin-id`
This commit is contained in:
silverwind
2024-12-15 03:31:07 +01:00
committed by GitHub
parent 7616aeb2ea
commit 1cfb718976
13 changed files with 36 additions and 36 deletions

View File

@@ -338,7 +338,7 @@ func GetIssueBlocks(ctx *context.APIContext) {
}
skip := (page - 1) * limit
max := page * limit
maxNum := page * limit
deps, err := issue.BlockingDependencies(ctx)
if err != nil {
@@ -352,7 +352,7 @@ func GetIssueBlocks(ctx *context.APIContext) {
repoPerms[ctx.Repo.Repository.ID] = ctx.Repo.Permission
for i, depMeta := range deps {
if i < skip || i >= max {
if i < skip || i >= maxNum {
continue
}

View File

@@ -308,7 +308,7 @@ func ListWikiPages(ctx *context.APIContext) {
}
skip := (page - 1) * limit
max := page * limit
maxNum := page * limit
entries, err := commit.ListEntries()
if err != nil {
@@ -317,7 +317,7 @@ func ListWikiPages(ctx *context.APIContext) {
}
pages := make([]*api.WikiPageMetaData, 0, len(entries))
for i, entry := range entries {
if i < skip || i >= max || !entry.IsRegular() {
if i < skip || i >= maxNum || !entry.IsRegular() {
continue
}
c, err := wikiRepo.GetCommitByPath(entry.Name())