Documentation
¶
Overview ¶
Package pairconsistency implements the `pair-consistency` rule type (spec §5): a `trigger` match obliges a `requires` match within the same UNIT. `where: same-file` (the default) makes the unit one file, and the rule is then a pure per-file Checker. `where: same-dir` makes the unit the containing directory — the package, for Go — which needs a cross-file finalizer and is therefore a whole-tree invariant. `where: same-func` makes the unit one function-grain span: a top-level Go function body (go/parser spans, so a multi-line signature cannot blind the unit the way the retired shell brace-depth accumulators did — a defect the validating port hit, lifted upstream in #77), a Dart function/method body, or a proto message/enum/service/rpc block (brace-depth units, added for the first production corpus).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Unit ¶
type Unit struct {
Name string
Start int // byte offset of the unit's first byte
End int // byte offset one past the unit's last byte
Line int // 1-based line of the unit's first byte
}
Unit is the exported view of one same-func unit, for instruments that must reason about the engine's OWN unit geometry rather than re-derive it — the consumer's vacuity census asks, per companion, which unit holds it, and a second walker there would drift from this one (#51's fix is the measured case: the census's Dart approximation disagreed with the engine).