Module

contracts.rules_oob_targets

OOB swap target cross-reference checks.

Warns when hx-swap-oob targets an ID not found in any template.

Functions

check_oob_targets 2 list[ContractIssue]
Warn when hx-swap-oob targets an ID not found in any template. Scans template …
def check_oob_targets(template_sources: dict[str, str], all_ids: set[str]) -> list[ContractIssue]

Warn when hx-swap-oob targets an ID not found in any template.

Scans template sources for elements with bothhx-swap-ooband idattributes, then checks if that ID exists anywhere across all templates (via the pre-builtall_idsset).

Only catches statically-analyzable targets. Dynamic IDs (Kida expressions) are excluded by design.

Parameters
Name Type Description
template_sources dict[str, str]
all_ids set[str]
Returns
list[ContractIssue]