beads/internal/testutil
Julian Knutsen a4509deb2d
ci(bazel): nogo replaces go vet and golangci-lint (ga-96smfk.18) (#7341)
* ci(bazel): nogo replaces go vet and golangci-lint (ga-96smfk.18)

Lint and vet now run as nogo inside the Bazel build, so they gate wherever
the Bazel lanes execute (rbe-west), and the golangci-lint and go vet jobs
leave pr.yml and main.yml.

- //tools/nogo (own go.mod, joined to beads' for go_deps only through
  gazelle.go.work): go test's vet checks (cmd/go's defaultVetFlags, the set
  scripts/ci/go-test-vet.sh ran) plus the eight linters .golangci.yml
  enables, each a wrapper over the library version golangci-lint v2.10.1
  uses (depguard, errcheck, forbidigo, gosec, misspell, sloglint, unconvert,
  unparam).
- .golangci.yml stays the single lint policy: Bazel embeds it and
  tools/nogo/internal/golangci applies it as golangci-lint does (enabled
  set, settings, run.tests: false as library-unit-only analysis, lax
  generated-file detection, path/path-except/text exclusion rules), with
  strict decoding so an unimplemented key fails the build.
- gascity's rules_go //nolint-range patch and x/tools ctrlflow patch,
  byte-identical.
- Windows/darwin: cross-configured, not a golangci leg. The pure lane's
  release cross-compile (//tools/bazel:release_cross, every library and
  binary for all eight release platforms, cgo off) runs nogo on every
  compile, a superset of golangci-lint's windows and darwin legs.
  scripts/pr-lint (make ci-pr-lint, bd preflight) runs `bazel build
  --config=nogo //...` plus release_cross for windows_amd64,darwin_arm64.
  release_cross skips tools/nogo, a separate Go module `go build ./...`
  never compiled.
- pr.yml: scripts-go-checks (vet) and pr-lint-wrapper (x3) are gone, with
  their ci-gate entries; main.yml: pr-lint-wrapper (x6) and go-vet-cache.
  scripts/ci/go-test-vet.sh and install-golangci-lint.sh are deleted.
- pre-commit hook and .pre-commit-config.yaml run `make lint-changed
  LINT_CHANGED_SCOPE=staged` (nogo over the staged packages); Makefile adds
  lint, vet and lint-changed. pr-lint.sh no longer runs gofmt
  (//scripts/repochecks:fmt_test owns it; ga-96smfk.41).
- internal/testutil/integration: five gosec findings in integration-tagged
  library files golangci-lint never built, now linted by the integration
  lanes, carry reasoned //nolint directives.

Parity: with the exclusion rules removed, golangci-lint and nogo report the
same 3,916 findings natively and 3,859 each for windows and darwin (file,
line, linter, text); with .golangci.yml as committed both report none.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* ci(bazel): equivalence.py leaves nested Go modules' tests out of go test's set

tools/nogo is its own Go module, so `go test ./...` in the root never runs
its tests; Bazel's unit lane does. Its packages are neither expected nor
extra.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 05:17:22 +00:00
..
bazeltest ci(bazel): run the scripts and source-walking tests remotely; retire their go test legs (#7320) 2026-10-06 22:20:16 +00:00
credentialcmd ci(bazel): run the scripts and source-walking tests remotely; retire their go test legs (#7320) 2026-10-06 22:20:16 +00:00
fixtures ci(bazel): run the scripts and source-walking tests remotely; retire their go test legs (#7320) 2026-10-06 22:20:16 +00:00
integration ci(bazel): nogo replaces go vet and golangci-lint (ga-96smfk.18) (#7341) 2026-10-07 05:17:22 +00:00
testdata testutil: migrate test Dolt server from binary-spawning to testcontainers 2026-02-28 21:12:41 -08:00
BUILD.bazel ci(bazel): retire the docker A/B variants and pr.yml's container jobs (#7340) 2026-10-07 04:13:24 +00:00
container_provider.go test(testutil): opt-in local dolt sql-server backend for Dolt-backed tests (#6891) 2026-09-28 04:06:49 -07:00
container_provider_windows.go /{cmd,internal}: some cleanup 2026-04-08 14:45:18 -07:00
dockercontext.go fix(test): pin DOCKER_HOST from the active docker context before TestMain swaps HOME (bd-84kos) (#5391) 2026-08-07 00:32:40 -07:00
dockercontext_test.go fix(test): pin DOCKER_HOST from the active docker context before TestMain swaps HOME (bd-84kos) (#5391) 2026-08-07 00:32:40 -07:00
git_test_hooks.go Test isolation follow-up: consolidate and guard hooksPath leakage (#2234) (#2237) 2026-03-01 14:41:08 -08:00
gm2g3g5r_failopen_test.go Fix: test suites fail closed instead of open on the ambient Dolt port when no test container is started (be-napos) (#5885) 2026-10-01 05:21:49 -07:00
gm2g3g5r_failopen_unix_test.go Fix: test suites fail closed instead of open on the ambient Dolt port when no test container is started (be-napos) (#5885) 2026-10-01 05:21:49 -07:00
gm2g3g5r_failopen_windows_test.go Fix: test suites fail closed instead of open on the ambient Dolt port when no test container is started (be-napos) (#5885) 2026-10-01 05:21:49 -07:00
localdoltserver.go test(testutil): opt-in local dolt sql-server backend for Dolt-backed tests (#6891) 2026-09-28 04:06:49 -07:00
localdoltserver_linux.go test(testutil): opt-in local dolt sql-server backend for Dolt-backed tests (#6891) 2026-09-28 04:06:49 -07:00
localdoltserver_other.go test(testutil): opt-in local dolt sql-server backend for Dolt-backed tests (#6891) 2026-09-28 04:06:49 -07:00
localdoltserver_test.go test(testutil): opt-in local dolt sql-server backend for Dolt-backed tests (#6891) 2026-09-28 04:06:49 -07:00
suite_temp.go fix(doltserver): recognize GOTMPDIR as a temp-dir sweep root (Go 1.26+) (#6733) 2026-09-26 04:30:59 -07:00
suite_temp_test.go fix(doctor): reap leaked test dolt sql-servers from CGO_ENABLED=0 suites (#5917) 2026-09-02 18:11:33 -07:00
testdoltbranch.go fix(testutil): wait for database visibility in SetupSharedTestDB (#5788) 2026-09-29 17:22:06 -07:00
testdoltbranch_test.go fix(testutil): wait for database visibility in SetupSharedTestDB (#5788) 2026-09-29 17:22:06 -07:00
testdoltcommon.go test(testutil): opt-in local dolt sql-server backend for Dolt-backed tests (#6891) 2026-09-28 04:06:49 -07:00
testdoltserver.go Fix: test suites fail closed instead of open on the ambient Dolt port when no test container is started (be-napos) (#5885) 2026-10-01 05:21:49 -07:00
testdoltserver_env_test.go test(testutil): opt-in local dolt sql-server backend for Dolt-backed tests (#6891) 2026-09-28 04:06:49 -07:00
testdoltserver_unreachable_test.go fix(test): recover when a Dolt test server dies mid-suite (#6756) 2026-09-26 14:27:18 -07:00
testdoltserver_windows.go Fix: test suites fail closed instead of open on the ambient Dolt port when no test container is started (be-napos) (#5885) 2026-10-01 05:21:49 -07:00
tmpfs.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00
tmpfs_test.go style: run gofmt across entire codebase (bd-nmk12) 2026-02-07 19:35:20 -08:00