beamte 0.1.0

Test-quality rules over treebank trees. Trees in, findings out.
Documentation
  • Coverage
  • 43.84%
    64 out of 146 items documented0 out of 66 items with examples
  • Size
  • Source code size: 132.1 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 6s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • zmaril

beamte

Test-quality rules over treebank trees. Trees in, findings out.

Beamte takes a parsed test file and returns findings about it: tests that cannot fail when the code breaks, tests that fail when nothing broke, tests whose failure tells you nothing. Every rule restates a post from the Google Testing Blog, and every finding cites the post it was issued under.

It is a library. It parses nothing, reads no files, writes no output format and owns no configuration — those are the host's, and straitjacket is the first host.

notes/DESIGN.md is the authoritative document — the rule catalogue and its provenance, the fidelity/resilience/precision spine, the boundary between this library and its host, the substrate it assumes, and the open questions. Start there.

Development

scripts/dev.sh points git at the committed hooks and runs both halves of the gate in the order CI checks them, starting with the no-default-features build, which is the claim the crate makes about itself.

scripts/dev.sh

cargo test                 # the library, with no parser and no dependencies
cargo test --workspace     # the rules, against real parsed source

dev adds a parser and a beamte binary so rules can be developed against real files. It is off by default and never reaches a consumer. It parses with treebank's own grammar and reads roles out of the manifests that grammar ships, so a rule is exercised against treebank's answers rather than a table written here.

treebank is not on crates.io yet, so it is taken as a git dependency. That needs no credentials — the repository is public — but it does mean beamte cannot be published until treebank is, which is why the crate is publish = false for now.

cargo run -p beamte-dev -- check   some_test.py   # findings
cargo run -p beamte-dev -- explain some_test.py   # the tree, with roles
cargo run -p beamte-dev -- rules                  # the catalogue

explain is the one that matters: when a rule misfires, the finding tells you nothing and the tree tells you everything.