forgejo/services/pull
Gusted 607d031069 [v15.0/forgejo]: chore: add modernizer linter (#11949)
**Backport: !11936**

- Go has a suite of small linters that helps with modernizing Go code by using newer functions and catching small mistakes, https://pkg.go.dev/golang.org/x/tools/go/analysis/passes/modernize.
- Enable this linter in golangci-lint.
- There's also [`go fix`](https://go.dev/blog/gofix), which is not yet released as a linter in golangci-lint: https://github.com/golangci/golangci-lint/pull/6385

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11949
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2026-04-02 16:54:46 +02:00
..
check.go chore: move code for manual merges into merge_manual.go (#10141) 2025-11-28 07:57:31 +01:00
check_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
comment.go feat: Use receive.hideRefs (#10015) 2025-11-10 14:36:15 +01:00
commit_status.go fix: correctly compute required commit status (#10747) 2026-01-12 10:53:40 +01:00
commit_status_test.go fix: correctly compute required commit status (#10747) 2026-01-12 10:53:40 +01:00
edits.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
lfs.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
main_test.go chore: move all test blank imports in a single package (#10662) 2026-01-02 05:32:32 +01:00
merge.go [v15.0/forgejo]: chore: add modernizer linter (#11949) 2026-04-02 16:54:46 +02:00
merge_ff_only.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
merge_manual.go chore: move code for manual merges into merge_manual.go (#10141) 2025-11-28 07:57:31 +01:00
merge_merge.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
merge_prepare.go fix: short-circuit to avoid rebasing (#8622) 2025-07-23 07:30:30 +02:00
merge_rebase.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
merge_squash.go fix(ui)!: remove squash merge committer trailer admin option (#11096) 2026-02-07 12:58:26 +01:00
merge_test.go fix(ui)!: remove squash merge committer trailer admin option (#11096) 2026-02-07 12:58:26 +01:00
patch.go chore: fix typos throughout the codebase (#10753) 2026-01-26 22:57:33 +01:00
patch_test.go feat: improved performances when checking for conflicts on pull requests (#7727) 2025-05-16 12:40:38 +00:00
patch_unmerged.go ci: detect and prevent empty case statements in Go code (#11593) 2026-03-10 02:50:28 +01:00
pull.go chore: fix typos throughout the codebase (#10753) 2026-01-26 22:57:33 +01:00
pull_test.go fix: correct Reviewed-on URL in merge message for subpath deployments (#11240) 2026-02-11 18:12:29 +01:00
review.go fix: pull request review comment position (#9914) 2025-10-31 16:17:23 +01:00
review_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
temp_repo.go chore: handle error types consistently (#9873) 2026-03-06 00:48:06 +01:00
update.go 2025-11-21 combined security patches (#10037) 2025-11-21 05:23:43 +01:00
update_rebase.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00