1
0
mirror of https://github.com/juanfont/headscale.git synced 2026-02-07 20:04:00 +01:00
juanfont.headscale/cmd/headscale
Kristoffer Dalby 4c210b9219 all: fix easy golangci-lint issues
Fix various linter issues:

- testifylint: use require instead of assert for error assertions
- thelper: add t.Helper() to test helper functions
- unconvert: remove unnecessary type conversions
- usetesting: use t.TempDir() instead of os.MkdirTemp
- intrange: use Go 1.22+ integer ranges
- nonamedreturns: remove named return values
- promlinter: rename gauge metric to not have _total suffix
- rowserrcheck: add rows.Err() check
- sqlclosecheck: use defer for rows.Close()
- tparallel: add t.Parallel() to subtests
- ineffassign: remove unused assignment

Add nolint directives for intentionally skipped issues:

- gocyclo: complex functions that need refactoring (16 functions)
- gosmopolitan: intentional i18n test data
- unqueryvet: false positives (not SQLBoiler)
- goconst: test-specific inline values
- noinlineerr: idiomatic inline error handling
2026-02-06 11:54:32 +00:00
..
cli all: fix golangci-lint issues (noctx, unused, unparam, goconst, prealloc, predeclared, gocritic) 2026-02-06 09:37:22 +00:00
headscale_test.go all: fix easy golangci-lint issues 2026-02-06 11:54:32 +00:00
headscale.go all: apply golangci-lint fixes 2026-02-06 06:54:44 +00:00