Skip to main content

Function: evaluateRules()

evaluateRules(rules, root, artifactId, parser): RuleEvaluationResult

Defined in: packages/core/src/domain/services/rule-evaluator.ts:57

Evaluates a list of validation rules against an AST root node.

Pure function — no I/O, no side effects. Suitable for use in both change-scoped and spec-scoped validation workflows.

Parameters

rules

readonly ValidationRule[]

The rules to evaluate

root

SelectorNode

The AST root node to evaluate against

artifactId

string

The artifact type ID for failure/warning attribution

parser

RuleEvaluatorParser

The parser for rendering subtrees during contentMatches checks

Returns

RuleEvaluationResult

An object containing all failures and warnings collected