Repository navigation
Releases
v0.3.1
Levenshtein v0.3.1 makes the existing GitHub Action eligible for GitHub Marketplace by shortening its description to fit GitHub's metadata limit.
The Action's inputs, outputs, checks, tool versions, and runtime behavior are unchanged from v0.3.0. This release also includes the post-publication documentation and example pin updates for v0.3.0.
GitHub Actions
Use the pinned release in a checked-out Go repository. The README and consumer CI guide provide a complete starter workflow. The Action sets up Go, caches results, annotates findings on pull requests, and writes a job summary.
Release verification
Platform archives include SPDX SBOMs and SHA-256 checksums. Verify downloaded files against checksums.txt and verify build provenance with gh attestation verify <file> --repo wangjohn/levenshtein.
Levenshtein v0.3.0
Levenshtein v0.3.0 improves verification correctness, native tool isolation, release packaging, and the path to adopting checks in GitHub Actions.
Highlights
- Add a minimal GitHub Actions starter workflow and clearer setup documentation.
- Add CLI
--versionand optional build, implementation, and native toolchain identity in reports. - Isolate native helper binaries by implementation and build identity, and prevent executable publication from leaking writer descriptors into forked children.
- Bound native subprocess output and reject malformed or incomplete diagnostics rather than accepting a clean prefix.
- Detect orphaned baseline entries and stale or ambiguous mutation acceptances.
- Add configuration version 2 with explicit community-rule completeness; version 1 remains supported.
- Include legal, contribution, security, and support metadata in release archives. Archives are built for Linux and macOS on amd64 and arm64, with SPDX SBOMs and SHA-256 checksums.
- Add contributor test tiers, a public roadmap, parser fuzzing, and reproducible synthetic native performance measurements.
Upgrading from v0.2.0
This minor release can expose findings or check errors that earlier versions missed. Review new baseline and mutation failures before accepting or deleting them, and investigate truncated or malformed tool output.
Configuration version 1 keeps its existing behavior. If you opt into version 2, selected native Go lint with participating community rule modules requires Dagger or an explicit lint.rule_modules=false opt-out. The opt-out skips those rules.
JSON report and baseline versions remain 1; strict report consumers should tolerate the new optional fields. The first run can rebuild tools and recompute affected cached results.
The native Go toolchain remains Go 1.27.1. Source-launcher bootstrap requires Go 1.21+; Dagger checks require a Docker-compatible runtime.
v0.3.0 ships Apache License 2.0 with NOTICE. Earlier published releases retain their original MIT license and contents. SDK security fixes preserve Dagger 0.21.9 compatibility; upgrading does not repair already downloaded historical archives.
See the full changelog and migration guidance, setup guide, and release archive instructions.
The root v0.3.0 tag and nested runner/lint/v0.3.0 tag identify the same release commit. The root GitHub Action is available at this release; a Marketplace listing is a separate owner publication step.
v0.2.0
Levenshtein 0.2.0 adds eight shared checks, a community lint rule system, and report formats for CI and code scanning. It also widens go-lint with more than 20 bug-finding analyzers. The full list of changes is in CHANGELOG.md.
Before you upgrade
- Repositories without a
levenshtein.jsonnow rungo-modin their defaultbranch,pre-merge, andmainruns. An untidy root module, or one whose dependencies the container can't download (for example private modules reached only throughvendor/), will start failing. Tidy the module, or add alevenshtein.jsonwhose runs leavego-modout. go-lintreports more findings. The new analyzers listed below are on by default, so bumping your pin may surface findings in existing code. To adopt them gradually, record them in a baseline or turn individual rules off with"lint": {"checks": [...]}.- An analyzer that errors or panics now fails the check. Before, Staticcheck swallowed the error and cached a pass.
Highlights
Run the linter with only go
No checkout, container, or config needed:
go run github.com/wangjohn/levenshtein/runner/lint/cmd/levenshtein-lint@v0.2.0 ./...Community lint rules
A top-level rule_modules object pins lint rules published as ordinary Go modules. They run beside the shipped rules in every Dagger go-lint check, report as <namespace>_<name>, work with //lint:ignore, and can be advisory. The community linter is built for the exact pins and runs with no credentials. See docs/community-rules.md.
Report formats, annotations, and SARIF
--formatwritesjson(the default),text,github(Actions annotations), orsarif(SARIF 2.1.0 for code scanning).--render REPORTreformats a saved report without rerunning anything.- The GitHub Action annotates failing findings by default, can write a SARIF file, and lists failing findings, advisory findings, and warnings in the job summary.
- Findings with a mechanical fix carry a one-line
hint, such asgofmt -w <file>.
Findings baseline
An optional baseline file records existing findings by file, code, and message, never by line number. Recorded findings don't fail the run, new ones do, and an entry that no longer matches anything fails as baseline-stale until you delete it. Create one with --write-baseline, or report everything with --no-baseline.
Templates for coding agents and CI
templates/ includes a starter levenshtein.json, a GitHub Actions workflow with annotations and a code scanning upload, Claude Code hooks, and an AGENTS.md section. See docs/agents.md.
New shared checks
Each runs on both executors (Dagger and native). Only go-mod joins the default gates; add the others to your own runs.
| Check | What it does |
|---|---|
go-mod |
go mod tidy -diff and go mod verify; fails on untidy manifests or hash mismatches |
go-test |
go test -race ./...; separates test failures and races from build errors and all-skipped runs |
go-imports |
Enforces package layering rules (deny / allow) declared in an imports object |
go-generate |
Reruns go generate in a scratch copy and reports any file it would change |
go-apidiff |
Fails a branch that breaks a library module's exported API relative to its base |
workflow-security |
zizmor 1.30.1 offline audits of workflows, composite actions, and Dependabot config |
shell-lint |
ShellCheck 0.11.0 over shell scripts, warnings and errors only |
secrets |
gitleaks 8.30.1 over the target's files, with every value redacted before it's reported |
deps-vuln |
osv-scanner 2.6.0 over non-Go lockfiles (npm, pnpm, yarn, Python, Cargo, Gemfile, and more) |
Third-party tool downloads are pinned by SHA-256 per platform and verified before they run.
More go-lint analyzers
- Bug patterns:
unparam,musttag,recvcheck,contextcheck,nilnesserr,fatcontext,bidichk,gocheckcompilerdirectives,exptostd,usetesting,reflectvaluecompare,httpmux,gochecksumtype,scannererr,testableexamples - go-critic: the likely-bug (
diagnostic) checkers plusfilepathJoin,badRegexp,badSyncOnceFunc,evalOrder,rangeAppendAll, andreturnAfterHttpError. Each reports under its own name, so you can ignore or deselect one at a time. - Logging:
zerologlintandloggercheck - Opt-in (off by default):
gocognit(cognitive complexity over 30) anddeferInLoop. Turn them on per check with"lint": {"checks": [...]}.
docs/checks.md lists the analyzers that were measured and left out, and why.
Fixes
go-lintin packages that import"C"now judges each file by its original source. Upstream findings in hand-written cgo files were silently dropped before, and LV1005 no longer reports cgo's build-cache output as unformatted.//lint:ignore nilerr <reason>now suppresses the finding instead of failing the check.musttagno longer fails unnoticed on the test main thatgo testgenerates.- Cancelling
verifynow stops input discovery'sgit ls-files, and a failed listing is no longer reused for the rest of the run.
Verifying the release
Each archive has an SPDX SBOM, and checksums.txt covers every file. Check an archive's build provenance with:
gh attestation verify <file> --repo wangjohn/levenshteinv0.1.0
Changelog
- 27f7ded Add LV1006 and go-mutation to 0.1.0; note fetch-depth for diff-based checks
- 5fb593e Merge origin/main into claude/cicd-checks-portability-b28aeb
- 7faf654 test-doc-pins: use git -C instead of cd && ... || true
- c5dd26c Merge pull request #37 from wangjohn/go-mutation
- a5a9a1f changelog: include LV1006 in 0.1.0
- 0dedb51 Ship a GitHub Action and prepare the v0.1.0 release
- c69d060 Merge origin/main into go-mutation
- e14e02c release: ship runner/mutation.go and guard against missing runner files
- 2aab424 Merge pull request #35 from wangjohn/lv1006-tests-can-fail
- ce51a81 Merge origin/main into go-mutation
- 6452768 verify: add go-mutation, diff-scoped mutation testing with gremlins
- ed5b6c5 gitchange: share base resolution and changed-file listing
- 4f746e9 docs: note LV1006 does not see exits inside called code
- 1f0e469 lint: fix LV1006 false positives on skips and exits
- 3f767bc Merge pull request #36 from wangjohn/claude/readme-levenshtein-cleanup-2c043a
- 3f89dd0 docs: tighten the coding-agents paragraph
- 2c3895f docs: explain why lint rules matter more with coding agents
- d92fe07 Merge pull request #31 from wangjohn/feat/native-go-checks
- 93638e1 docs: rewrite the README for open source
- 548ab02 Merge origin/main into lv1006-tests-can-fail
- 920a94f Merge remote-tracking branch 'origin/main' into feat/native-go-checks
- 0a61612 Merge pull request #28 from wangjohn/perf/fingerprint-stat-cache
- cf4dc73 Merge remote-tracking branch 'origin/main' into feat/native-go-checks
- 0eea005 Merge remote-tracking branch 'origin/main' into perf/fingerprint-stat-cache
- 42f0b52 lint: add LV1006 for tests that cannot fail
- ae78791 Merge pull request #30 from wangjohn/ci/hygiene-and-release
- d270ee2 fix: key native Go checks on runner/, match the container's workspace
- 7ff6266 fix: share one check-selection table between the runner and the CLI
- ef8673a Merge pull request #27 from wangjohn/refactor/config-and-docs
- 049cfc7 Merge remote-tracking branch 'origin/main' into feat/native-go-checks
- df69cdd style: range over strings.SplitSeq in git discovery
- ebadb20 Merge remote-tracking branch 'origin/main' into perf/fingerprint-stat-cache
- 5a077d4 Merge remote-tracking branch 'origin/main' into refactor/config-and-docs
- 12e9382 Merge remote-tracking branch 'origin/main' into feat/native-go-checks
- 30df133 Merge pull request #33 from wangjohn/feat/modernize-analyzers
- 8187383 ci: address review of the CI hygiene change
- ad2ac6b fix: close the review's discovery and stat-cache gaps
- 54878da ci: keep testdata out of the gofmt gate
- a38af25 Merge remote-tracking branch 'origin/main' into ci/hygiene-and-release
- fa97f05 fix: point #29's new link at checks.md and satisfy noctx
- 9ba56a0 Merge remote-tracking branch 'origin/main' into perf/fingerprint-stat-cache
- ce9e759 lint: pin modernize version gating and name the rules in the fix command
- e374595 lint: enable the five modernize analyzers that fire on real code
- e8b3969 Merge remote-tracking branch 'origin/main' into refactor/config-and-docs
- af00aa5 Merge pull request #29 from wangjohn/feat/broader-go-analyzers
- 15ee176 runner: match Staticcheck's check selection; LV1004 counts physical lines
- b1d230e ci: skip dependency review when the repository has no dependency graph
- a242923 docs: native Go checks, their trade-off, and caching them in CI
- 2920262 ci: exercise the native shared Go checks without Dagger
- bb4c318 feat: native execution for go-lint, go-vet, workflow-lint, and go-vuln
- b13e1fd feat: port the shared check findings parser into the CLI
- 434b15d docs: say that dependency review needs the dependency graph
- 8435449 docs: keep the CI section's opening line as it is on main
- b0582b8 test: keep the resources-good fixture passing the defaults
- 737f8f6 chore: repository meta, optional hooks, and an editor config
- 854141d ci: publish a release for a tag, with SBOMs and provenance
- b4b4938 ci: audit the workflows, the dependencies, and this repository
- 3cecb7d ci: gate formatting, module hygiene, Python lint, and coverage
- 1045e91 docs: describe the broadened Go lint set
- f785114 fix: satisfy the broadened rule set
- 340553e test: give every default rule a triggering fixture
- 7139d5b runner: select checks the way the linter does
- 0a8746d lint: enable the full Staticcheck set and curated analyzers
- 3a31e49 lint: add LV1003-LV1005 and a shared analyzer adapter
- 211c7b8 docs: input discovery, exclude, the stat cache, and --jobs
- 772a3d3 feat: --jobs caps how many checks run at once
- 48d45c1 perf: memoized, git-aware input fingerprinting
- 0a35f96 test: build the no-Go PATH from symlinks instead of system directories
- 875b194 docs: leave the two verify.yml cache facts to the CI change
- 0f71711 docs: consolidate the check and contract documents
- b165d04 refactor: let the launcher provision the pinned Go toolchain
- b44bbad refactor: declare one check per kind with a targets list
- 884abd2 Merge pull request #26 from wangjohn/chore/composite-cache-actions
- d5c0e0c ci: pin actions/cache 6.1.0 in the composite actions too
- 159d801 Merge pull request #22 from wangjohn/dependabot/github_actions/actions/cache/restore-6.1.0
- 93180b0 Merge pull request #23 from wangjohn/dependabot/github_actions/actions/cache/save-6.1.0
- 7908b2a Merge pull request #21 from wangjohn/dependabot/go_modules/runner/lint/go-dependencies-f9b4b09e6e
- 15de2a0 Merge pull request #20 from wangjohn/dependabot/go_modules/go-dependencies-2f12d35f0e
- b153aff chore(deps): Bump actions/cache/save from 4.2.3 to 6.1.0
- 1087a4a chore(deps): Bump actions/cache/restore from 4.2.3 to 6.1.0
- a3f4bdc Merge pull request #18 from wangjohn/ci/shrink-and-single-source
- bb514c4 Merge remote-tracking branch 'origin/main' into ci/shrink-and-single-source
- fb5f7a0 Merge pull request #15 from wangjohn/docs/product-vs-roadmap
- f4e2eaf Merge pull request #16 from wangjohn/fix/semantic-lint-hardening
- f5f6598 Merge pull request #25 from wangjohn/refactor/check-options
- 3068135 docs: name rerun_args in the roadmap
- e1d48ad Merge remote-tracking branch 'origin/refactor/check-options' into fix/semantic-lint-hardening
- c1578c1 Merge remote-tracking branch 'origin/refactor/check-options' into docs/product-vs-roadmap
- 54da4b2 Merge remote-tracking branch 'origin/refactor/check-options' into ci/shrink-and-single-source
- 098ab28 Merge remote-tracking branch 'origin/main' into refactor/check-options
- fad75a2 ci: keep the SDK readiness probe to a build
- ee589f6 Merge remote-tracking branch 'origin/main' into ci/shrink-and-single-source
- c275a90 Merge remote-tracking branch 'origin/main' into docs/product-vs-roadmap
- 5d22fa5 Merge remote-tracking branch 'origin/main' into fix/semantic-lint-hardening
- 70635f7 build(deps): bump golang.org/x/tools
- 9d81286...