forgejo/models/git
Gusted 77dbc35138 chore: add modernizer linter (#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/11936
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 03:29:37 +02:00
..
TestCleanupCommitStatus fix: add forgejo doctor cleanup-commit-status command (#10686) 2026-01-10 23:15:21 +01:00
TestIterateRepositoryIDsWithLFSMetaObjects Refactor LFS GC functions 2024-04-05 16:49:15 +02:00
branch.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
branch_list.go refactor: replace Value() from Option[T] with Get() & ValueOrZeroValue() (#11218) 2026-02-10 16:41:21 +01:00
branch_test.go chore: fix typos throughout the codebase (#10753) 2026-01-26 22:57:33 +01:00
commit_status.go fix: add forgejo doctor cleanup-commit-status command (#10686) 2026-01-10 23:15:21 +01:00
commit_status_summary.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
commit_status_test.go fix: add forgejo doctor cleanup-commit-status command (#10686) 2026-01-10 23:15:21 +01:00
lfs.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
lfs_lock.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
lfs_lock_list.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
lfs_test.go chore: merge tests.AddFixtures and unittest.OverrideFixtures (#7648) 2025-04-25 09:14:33 +00:00
main_test.go chore: move all test blank imports in a single package (#10662) 2026-01-02 05:32:32 +01:00
protected_branch.go chore: add modernizer linter (#11936) 2026-04-02 03:29:37 +02:00
protected_branch_list.go chore: fix typos throughout the codebase (#10753) 2026-01-26 22:57:33 +01:00
protected_branch_list_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
protected_branch_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
protected_tag.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
protected_tag_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00