lint: adopt org-standard .golangci.yml and golangci-lint v2.12.2 (closes #14)
check / check (push) Failing after 1s
check / check (push) Failing after 1s
The old backend/.golangci.yml declared version "2" but used v1 schema keys, so under v2 it never validated and its thresholds were inert: the linter ran at defaults. Replace it verbatim with the org-standard file, repin the Dockerfile.backend lint stage to golangci-lint v2.12.2, and assert the config's sha256 as the first step of the backend lint target so it cannot silently drift again -- a local hash check, no network. The standard config surfaces findings only in the tests: the repeated IP literals in middleware_test.go become named constants (goconst) and its request switches to NewRequestWithContext (noctx). reportbuf.go's gosec suppression gains a plain justification comment. The rest of the backend, including the fx-based server lifecycle, is already clean. TODO.md updated. Model: opus-4-8
This commit was merged in pull request #31.
This commit is contained in:
@@ -10,15 +10,16 @@
|
||||
|
||||
# Status
|
||||
|
||||
pre-1.0. No git tags. Backend work in flight on feat/reportbuf-storage (dirty:
|
||||
src/main.js). Frontend is functional; backend is new and unmerged.
|
||||
pre-1.0. No git tags. `feat/reportbuf-storage` is merged; the backend, the CI
|
||||
workflow, and the backend repo standard files are all on `main`. Frontend and
|
||||
backend are both functional. Working toward the 1.0.0 milestone by closing the
|
||||
remaining repo-compliance issues on the tracker.
|
||||
|
||||
# Next Step
|
||||
|
||||
Land feat/reportbuf-storage: finish the in-progress src/main.js change, get make
|
||||
check green, and merge the branch to main. The branch adds the backend (buffered
|
||||
zstd-compressed report storage), the CI workflow, and backend repo standard
|
||||
files, so merging it also closes most compliance gaps.
|
||||
Confirm the `.gitea/workflows/check.yml` run is green (main always green
|
||||
policy). The workflow file is already on `main`; what is unverified is that its
|
||||
latest run passes.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
@@ -36,6 +37,14 @@ files, so merging it also closes most compliance gaps.
|
||||
frame/sniff/referrer/permissions headers) registered before CORS, and
|
||||
trusted-proxy client IP resolution honouring `X-Forwarded-For` / `X-Real-IP`
|
||||
only from a `TRUSTED_PROXIES` allowlist (loopback plus RFC1918 by default)
|
||||
- 2026-08-10: adopted the org-standard `backend/.golangci.yml` verbatim and
|
||||
moved the pinned golangci-lint from v2.7.2 to v2.12.2 (the `lint` stage of
|
||||
`Dockerfile.backend` now pins the `golangci/golangci-lint:v2.12.2` image by
|
||||
digest); the previous config declared `version: "2"` but used v1 schema keys,
|
||||
so every threshold in it was inert and its green result was meaningless.
|
||||
`backend/Makefile`'s `lint` target now asserts the config's sha256 against the
|
||||
canonical file first, so drift from the org standard fails the build instead
|
||||
of silently degrading to defaults
|
||||
- 2026-08-10: every interactive control now meets the 44x44 CSS px minimum tap
|
||||
target (`.pin-btn`, `#interval-select`, the debug-log label and, on narrow
|
||||
viewports, `#pause-btn`). The pin button's hit area grows via matching
|
||||
@@ -65,7 +74,7 @@ files, so merging it also closes most compliance gaps.
|
||||
shims, README Entrypoints section
|
||||
- 2026-02-27: backend with buffered zstd-compressed report storage; CI workflow
|
||||
and backend repo standard files; backend Dockerfile fixed (Go 1.25,
|
||||
golangci-lint) and moved to repo root (feat/reportbuf-storage, unmerged)
|
||||
golangci-lint) and moved to repo root (feat/reportbuf-storage)
|
||||
- 2026-02-26: host row layout redesigned with CSS grid; overflow and spacing
|
||||
fixes; nginx config extracted; port hardcoded to 8080
|
||||
- 2026-02-26: debug log panel, median stats, recovery probe, Docker build fix,
|
||||
@@ -87,3 +96,9 @@ files, so merging it also closes most compliance gaps.
|
||||
(main always green policy)
|
||||
- Decide what to do with untracked resume.sh: commit it, gitignore it, or delete
|
||||
it
|
||||
- Upstream fix needed in `sneak/prompts`: the org-standard `.golangci.yml`
|
||||
enables `gomodguard`, which golangci-lint v2.12.2 reports as deprecated since
|
||||
v2.12.0 and replaced by `gomodguard_v2`, so every backend lint run prints a
|
||||
deprecation warning. The file is standardized and must never be edited in this
|
||||
repo, so nothing can be done here beyond tracking it — tracked at
|
||||
<https://git.eeqj.de/sneak/netwatch/issues/41>
|
||||
|
||||
Reference in New Issue
Block a user