Skip to content

latent.lint.rules.lt019

LT019 — A hand-rolled read of parameters.yaml or catalog.yaml.

Functions

lt019

lt019(ctx: RuleContext) -> Iterator[tuple[int, str]]

A hand-rolled read of parameters.yaml or catalog.yaml.

@flow loads both before the body runs and get_config()/ get_catalog() are the result, so the hand-rolled read is not a second way to the same data. It is a different, smaller answer: load_flow_config layers bundled package defaults under <flows_dir>/global.yaml under the flow's own file and then substitutes ${ENV} references, and a direct yaml.safe_load of one file skips all of it. The flow then disagrees with every other flow about what the configuration says, and CLI overrides — merged into the same dict — never reach it at all.

Gated on evidence that the module runs under the machinery (:func:_is_flow_module), for LT004/LT005's reason: outside a flow context get_config() raises, so a plain script beside a catalog.yaml would be told to use a replacement it cannot call.

A constant counts in two positions: an argument to a call — a log line included, so a bare logger.info("catalog.yaml") fires and wants rewording or a waiver — and inside the path a read consumes, (HERE / "parameters.yaml").read_text(). Prose stays silent because :func:_sidecar_name matches the whole tail, not a substring. A write of a sidecar is not this finding, and a path built and never read is not either: both are silences, because the remedy this rule names can only read.