Repository navigation
chore: add Go linters and migrate tests to testify - #3
Conversation
brawler2011
left a comment
There was a problem hiding this comment.
Reviewed the complete diff, including the lint gate, CI/release integration, production autofixes, and all seven migrated test files. No blocking findings.
Checked that all build/test/lint targets use the same feature tags, the pinned linter supports the project's Go version, compound test assertions retain their checks, pointer/slice prerequisites stop tests before dependent access, and assertions in worker goroutines remain non-fatal. Cleanup, optional numeric parsing defaults, and process error wrapping were also reviewed.
Validation: make check passed on Go 1.26.4 and Go 1.27.1 (zero lint issues and all tests passing); make build and git diff --check passed. GitHub CI will be checked before merging.
This is the implementing agent's own review, not an independent reviewer approval.
brawler2011
left a comment
There was a problem hiding this comment.
Final self-review found one test-equivalence issue and fixed it: assert.NoFileExists also accepts directories and arbitrary stat errors. The cleanup test now checks os.Stat with require.ErrorIs(err, fs.ErrNotExist), retaining the original strict requirement that the temporary config is absent.
After the correction, GOTOOLCHAIN=go1.26.4 make check passes again with zero lint issues and all tests passing. No remaining blocking findings. This is the implementing agent's self-review; CI for the final commit is still required before merging.
Adds a shared Go lint gate to catch errors and outdated code in local checks, CI, and releases.
make lintruns golangci-lint v2 with the standard checks plus modernize, testifylint, bodyclose, and errorlint; workflows install pinned v2.13.2.Migrates existing tests to testify/assert and testify/require, uses testing-managed temporary directories and environment cleanup, and fixes the enabled linters' findings. CLI list output and HWID persistence now return write errors; wrapped process errors preserve their causes. Numeric parsing retains its existing defaults for invalid optional fields.
Validation:
make checkon Go 1.26.4 and Go 1.27.1: no lint issues, all tests pass.make build: passes.git diff --check: passes.