validate

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package validate implements two phases of semantic validation. Phase A runs per line during Import: value-type checks on captured fields (list args validate per item, as the author spelled them), cardinality and duplicate-key detection, toggle co-presence, and required-child presence. Phase B (CommitCheck) runs over an assembled tree: referential integrity for every Ref (per item for list-valued refs) and Requires existence.

Invalid values, unresolved references, and duplicate keys are Errors in all policies. diag.Policy controls only unknown input during parsing. An unresolved-reference diagnostic identifies the referring source line.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitCheck

func CommitCheck(cfg *tree.Config, d *diag.Diagnostics)

CommitCheck validates references and prerequisites against the assembled tree.

func PhaseA

func PhaseA(cfg *tree.Config, d *diag.Diagnostics)

PhaseA validates node values, cardinality, duplicate keys, toggle exclusions, and required nodes within each level.

Types

This section is empty.

Jump to

Keyboard shortcuts

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