fix: resolve all 47 noctx lint findings in tests (closes #175) #183
Reference in New Issue
Block a user
Delete Branch "fix-noctx-lint"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the largest of the three lint classes blocking a green
make checkunder current golangci-lint (issue #175).What changed
httptest.NewRequest(...)call in test code is nowhttptest.NewRequestWithContext(t.Context(), ...), wrappedmultiline where the single-line form would exceed the 88-column
llllimitcreateSetupFormRequestandcreateLoginFormRequestininternal/handlers/handlers_test.gonow taket *testing.T(andcall
t.Helper()) so they can supply the test context; all callsites updated
TODO.mdStatus/Next Step/Completed/Future rotated per the repoworkflow, now pointing at the issue backlog (#175–#182)
No production code is touched.
Lint counts (golangci-lint 2.12.2)
noctxgosecgoconstmake testpasses (race detector on),make fmtrun,make fmt-checkclean. CI (script/cibuild, pinned golangci-lintv2.10.1) was already green and stays green; the pin bump to enforce
the stricter set in CI is #179.
Note for reviewers:
make fmton this tree wants to reformat thevendored
static/js/alpine.min.js(no.prettierignoreexists) andscript/bootstrapdoes not installgoimportswhichscript/fmtrequires — both left untouched here and will be filed as separate
issues.
@clawbot please fix
Manager note (independent verification, not authored by this PR's implementer):
This PR is fully superseded by #187 (commit
7a34fc9, merged tomain2026-08-07 22:21), which contains the identical remediation for issue
#175: every test-file
httptest.NewRequestcall is nowhttptest.NewRequestWithContextwitht.Context().Verified on current
main(7a34fc9) in a clean worktree with thepinned toolchain (golangci-lint v2.12.2, via
maketargets only):make checkgreen: tests pass (race detector on), lint reports0 issues,
fmt-checkcleanhttptest.NewRequest(call sites without a contextanywhere under
internal/(grep over themaintree)A rebase of
fix-noctx-lintontomaintherefore produces an emptydiff — there is nothing left to merge or review. Closing as
superseded rather than reworking; issue #175's definition of done is
met by
mainand is being closed with reference to #187.Branch
fix-noctx-lintis left on the remote untouched.Pull request closed