forgejo/models/unittest
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
..
testdata fix NewMockWebServer(): Headers never reached the http client (#11007) 2026-01-24 04:51:18 +01:00
consistency.go fix: reduce deadlocks merging PRs by using caching for repo issue count stats (#9922) 2025-10-31 23:50:05 +01:00
fault_injector.go chore: add SQL fault injector testing (#9314) 2025-09-18 00:39:06 +02:00
fault_injector_test.go chore: add SQL fault injector testing (#9314) 2025-09-18 00:39:06 +02:00
fixture_loader.go [v15.0/forgejo]: chore: add modernizer linter (#11949) 2026-04-02 16:54:46 +02:00
fixtures.go feat: add foreign keys to stopwatch & tracked_time tables (#9373) 2025-10-01 00:31:38 +02:00
fscopy.go chore: simplify CopyDir 2024-11-10 17:21:57 +01:00
mock_http.go [v15.0/forgejo]: chore: add modernizer linter (#11949) 2026-04-02 16:54:46 +02:00
mock_http_test.go fix NewMockWebServer(): Headers never reached the http client (#11007) 2026-01-24 04:51:18 +01:00
reflection.go [v15.0/forgejo]: chore: add modernizer linter (#11949) 2026-04-02 16:54:46 +02:00
testdb.go fix: reduce deadlocks merging PRs w/ async label stat recalcs (#9868) 2025-10-31 02:12:36 +01:00
unit_tests.go fix: reduce deadlocks merging PRs w/ async label stat recalcs (#9868) 2025-10-31 02:12:36 +01:00