scannercert

command
v0.57.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Command scannercert reports whether a grammar's external scanner gives the same answers when it resumes from its serialized state. It writes one deterministic JSON report per grammar.

It is report-only. It exits zero when it wrote every report, whatever the scanner findings, and it changes no grant. It exits nonzero for a report with the verdict not-transparent, because the parse with the recorder then differed from the parse without it. Run it from the repository root with the GOT_, GTS_ and GOTREESITTER_ variables unset; each report lists any that are set:

go run ./cmd/scannercert -language lua,yaml -out /tmp/scannercert
go run ./cmd/scannercert -language lua
go run ./cmd/scannercert -list

The committed samples are small. To also parse each grammar's median and largest R4 inputs, fetch them first and name the directory:

python3 scripts/benchfixture_corpus.py fetch --language lua --output /tmp/r4
go run ./cmd/scannercert -language lua -fetched /tmp/r4 -out /tmp/scannercert

The internal/scannercert package describes what a report records.

Directories

Path Synopsis
internal
scannercert
Package scannercert reports whether an external scanner gives the same answers when it resumes from its serialized state as when it carries on from the live state that produced those bytes.
Package scannercert reports whether an external scanner gives the same answers when it resumes from its serialized state as when it carries on from the live state that produced those bytes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL