chore(lint): align .golangci.yml with gitlab-mcp-server, ignore TypeScript majors (#82)
Pulls the sibling jmrplens/gitlab-mcp-server configuration from GitHub —
which differs from the local checkout — and applies its settings here.
Adopted: complexity guards (gocyclo 20, gocognit 25, nestif 5,
maintidx 20), dupl, the gofumpt and gci formatters, gocritic's
opinionated and experimental tags, staticcheck with no check exclusions
(ST1000, ST1016 and QF1008 were suppressed before), gosec in audit mode
with only G104 excluded (G304 no longer suppressed), revive at severity
error, nolintlint allow-unused false, and the stricter usetesting and
perfsprint settings.
Kept project-specific: the `routeros` spelling exemptions, the prealloc
linter the sibling does not run, and the local module paths.
Not adopted: the sibling's `concurrency: 4`, calibrated for a
226-package tree where the default peaked at 4.4GB. On a repository this
size it would only cost parallelism.
Findings this surfaced, and how each was resolved:
- gofumpt/gci formatting in 5 files — applied via `golangci-lint fmt`.
- perfsprint in stream.go — fmt.Sprintf replaced with concatenation.
- gocognit on (*Stream).Run — two near-identical loops for new and
deleted decisions were the cause. Extracted to forwardBatch, keeping
the per-kind log fields and mid-batch cancellation intact. A genuine
deduplication, not a workaround for the threshold.
- gocyclo/gocognit on three table-driven tests — complexity guards are
now scoped to production code. Two of the three already carried
`// NOSONAR: ... intentionally stay together.`
`make fmt` now runs `golangci-lint fmt` instead of gofmt plus goimports,
which could not apply gofumpt or gci and would leave drift the lint run
then rejects. `make fmt-check` reports that drift without rewriting.
Separately, Dependabot no longer proposes TypeScript majors for docs/.
TypeScript 7 ships the native compiler, which does not expose the
programmatic API `astro check` is built on; #79 failed the Astro docs
job on exactly that and was closed. Minor and patch updates to 6.x still
come through.
Verified from a deleted bin/tools: `make analyze` passes end to end and
the full test suite is green.