Files
rtk-ai__rtk/tests/fixtures/golangci_v2_clean_raw.json
Nicolas Le Cam 67007fe910 test(go): use captured golangci-lint output and drop the synthetic fixture
golangci_v2_json.txt is pretty-printed across 144 lines; golangci-lint emits its
JSON on a single line, so the fixture was a shape real output never takes. The
savings assertion counted whitespace-separated words, so the indentation was
doing the work -- against real single-line output that same helper reads 40
"words" for 4 KB and reports 30% for a filter that is doing its job. Measured
with estimate_tokens, the estimator RTK bills with, the real figure is 95.3%.

Replaced with output captured from golangci-lint in golang:1.27: a clean v2.13.2
report, a v2.13.2 report carrying 3 errcheck and 3 ineffassign findings, and the
628 bytes v1.64.8 writes to stderr when its vendored go/types cannot read Go
1.27 export data.

That last one backs a test the suite had no equivalent of: whatever the filter
is handed -- empty, whitespace, error text, truncated JSON, v1 or v2 -- it must
say something. Returning an empty string is what let `rtk golangci-lint run`
print nothing at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-30 14:58:55 +02:00

2 lines
2.7 KiB
JSON

{"Issues":[],"Report":{"Linters":[{"Name":"arangolint"},{"Name":"asasalint"},{"Name":"asciicheck"},{"Name":"bidichk"},{"Name":"bodyclose"},{"Name":"canonicalheader"},{"Name":"clickhouselint"},{"Name":"containedctx"},{"Name":"contextcheck"},{"Name":"copyloopvar"},{"Name":"cyclop"},{"Name":"decorder"},{"Name":"depguard"},{"Name":"dogsled"},{"Name":"dupl"},{"Name":"dupword"},{"Name":"durationcheck"},{"Name":"embeddedstructfieldcheck"},{"Name":"errcheck","Enabled":true},{"Name":"errchkjson"},{"Name":"errname"},{"Name":"errorlint"},{"Name":"exhaustive"},{"Name":"exhaustruct"},{"Name":"exhaustruct_v5"},{"Name":"exptostd"},{"Name":"forbidigo"},{"Name":"forcetypeassert"},{"Name":"funcorder"},{"Name":"fatcontext"},{"Name":"funlen"},{"Name":"gci"},{"Name":"ginkgolinter"},{"Name":"gocheckcompilerdirectives"},{"Name":"gochecknoglobals"},{"Name":"gochecknoinits"},{"Name":"gochecksumtype"},{"Name":"gocognit"},{"Name":"goconst"},{"Name":"gocritic"},{"Name":"gocyclo"},{"Name":"godoclint"},{"Name":"godot"},{"Name":"godox"},{"Name":"err113"},{"Name":"gofmt"},{"Name":"gofumpt"},{"Name":"golines"},{"Name":"goheader"},{"Name":"goimports"},{"Name":"mnd"},{"Name":"modernize"},{"Name":"gomoddirectives"},{"Name":"gomodguard"},{"Name":"gomodguard_v2"},{"Name":"goprintffuncname"},{"Name":"gosec"},{"Name":"gosmopolitan"},{"Name":"govet","Enabled":true},{"Name":"grouper"},{"Name":"iface"},{"Name":"importas"},{"Name":"inamedparam"},{"Name":"ineffassign","Enabled":true},{"Name":"interfacebloat"},{"Name":"intrange"},{"Name":"iotamixing"},{"Name":"ireturn"},{"Name":"lll"},{"Name":"loggercheck"},{"Name":"maintidx"},{"Name":"makezero"},{"Name":"mirror"},{"Name":"misspell"},{"Name":"musttag"},{"Name":"nakedret"},{"Name":"nestif"},{"Name":"nilerr"},{"Name":"nilnesserr"},{"Name":"nilnil"},{"Name":"nlreturn"},{"Name":"noctx"},{"Name":"noinlineerr"},{"Name":"nonamedreturns"},{"Name":"nosprintfhostport"},{"Name":"paralleltest"},{"Name":"perfsprint"},{"Name":"prealloc"},{"Name":"predeclared"},{"Name":"promlinter"},{"Name":"protogetter"},{"Name":"reassign"},{"Name":"recvcheck"},{"Name":"revive"},{"Name":"rowserrcheck"},{"Name":"sloglint"},{"Name":"sqlclosecheck"},{"Name":"spancheck"},{"Name":"staticcheck","Enabled":true},{"Name":"swaggo"},{"Name":"tagalign"},{"Name":"tagliatelle"},{"Name":"testableexamples"},{"Name":"testifylint"},{"Name":"testpackage"},{"Name":"thelper"},{"Name":"tparallel"},{"Name":"typecheck","Enabled":true},{"Name":"unconvert"},{"Name":"unparam"},{"Name":"unqueryvet"},{"Name":"unused","Enabled":true},{"Name":"usestdlibvars"},{"Name":"usetesting"},{"Name":"varnamelen"},{"Name":"wastedassign"},{"Name":"whitespace"},{"Name":"wrapcheck"},{"Name":"wsl"},{"Name":"wsl_v5"},{"Name":"zerologlint"},{"Name":"nolintlint"}]}}