summaryrefslogtreecommitdiffstats
path: root/routers/web/repo/issue.go
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-04-22 13:48:42 +0200
committerGitHub <noreply@github.com>2024-04-22 11:48:42 +0000
commit74f0c84fa4245a20ce6fb87dac1faf2aeeded2a2 (patch)
tree94b0356bea5ad1cd24a523947cf001509a973be1 /routers/web/repo/issue.go
parentaff7b7bdd285cc1fcabea774f153886e11ae9f5d (diff)
downloadgitea-74f0c84fa4245a20ce6fb87dac1faf2aeeded2a2.tar.gz
gitea-74f0c84fa4245a20ce6fb87dac1faf2aeeded2a2.zip
Enable more `revive` linter rules (#30608)
Noteable additions: - `redefines-builtin-id` forbid variable names that shadow go builtins - `empty-lines` remove unnecessary empty lines that `gofumpt` does not remove for some reason - `superfluous-else` eliminate more superfluous `else` branches Rules are also sorted alphabetically and I cleaned up various parts of `.golangci.yml`.
Diffstat (limited to 'routers/web/repo/issue.go')
-rw-r--r--routers/web/repo/issue.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go
index 1364d75676..95f0cf3d71 100644
--- a/routers/web/repo/issue.go
+++ b/routers/web/repo/issue.go
@@ -933,7 +933,6 @@ func setTemplateIfExists(ctx *context.Context, ctxDataKey string, possibleFiles
}
}
}
-
}
if template.Ref != "" && !strings.HasPrefix(template.Ref, "refs/") { // Assume that the ref intended is always a branch - for tags users should use refs/tags/<ref>
@@ -1681,7 +1680,6 @@ func ViewIssue(ctx *context.Context) {
if comment.ProjectID > 0 && comment.Project == nil {
comment.Project = ghostProject
}
-
} else if comment.Type == issues_model.CommentTypeAssignees || comment.Type == issues_model.CommentTypeReviewRequest {
if err = comment.LoadAssigneeUserAndTeam(ctx); err != nil {
ctx.ServerError("LoadAssigneeUserAndTeam", err)
@@ -2610,7 +2608,6 @@ func SearchIssues(ctx *context.Context) {
var includedAnyLabels []int64
{
-
labels := ctx.FormTrim("labels")
var includedLabelNames []string
if len(labels) > 0 {
@@ -2994,7 +2991,6 @@ func NewComment(ctx *context.Context) {
if (ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) || (ctx.IsSigned && issue.IsPoster(ctx.Doer.ID))) &&
(form.Status == "reopen" || form.Status == "close") &&
!(issue.IsPull && issue.PullRequest.HasMerged) {
-
// Duplication and conflict check should apply to reopen pull request.
var pr *issues_model.PullRequest