ConformanceVectors

The conformance vectors: what each guard in the specification decides, pair by pair.

spec/guards/SPEC.md states each rule in prose that a Python, Go or TypeScript implementer can work from. Prose about tokenization is where two implementations quietly diverge, so the rules come with this: a file of decided cases, which is a disagreement that fails a build instead of one that surfaces as a wrong answer eighteen months later.

The vectors are generated from the shipped guards and committed, in the way the public API dumps are, so a change to a rule shows up as a diff somebody has to approve rather than as a number that moved.

A vector is a verdict, not a mechanism. Nothing here requires a particular tokenizer, a particular reason string, or a particular internal structure. The specification names the guards whose rule could not be stated without reference to this tokenizer, and those carry a marker saying so.

Properties

Link copied to clipboard
const val RESOURCE: String

Where the shipped vector file sits on the classpath.

Functions

Link copied to clipboard

Runs guard against every vector naming it and returns the ones it did not reproduce.

Link copied to clipboard

Every vector for one guard name.

Link copied to clipboard

Parses a vector file. See spec/guards/vectors.json for the shape.

Link copied to clipboard

The vectors that ship with this artifact.