luplo.core.checks.runner

Dispatch and aggregation for the rule pack.

Functions

run_checks() → list[luplo.core.checks.types.Finding])

Run the selected rules and return their aggregated findings.

Module Contents

async luplo.core.checks.runner.run_checks(conn: psycopg.AsyncConnection[Any], project_id: str, *, rule_names: collections.abc.Iterable[str] | None = None, disabled: collections.abc.Iterable[str] = ()) list[luplo.core.checks.types.Finding]

Run the selected rules and return their aggregated findings.

Parameters:
  • conn – Async psycopg connection.

  • project_id – Project scope — every rule is project-local.

  • rule_names – If given, run only these rules (by Rule.name). Unknown names raise ValidationError before any SQL runs. When None, run every registered rule.

  • disabled – Names to skip (typically from .luplo [checks] disabled_rules). Silently no-ops when a disabled name also appears in rule_names — the caller’s explicit --rule X does not override the project-level disable.

Returns:

Flat list of Finding ordered first by the rule order in luplo.core.checks.registry.RULES, then by whatever order the rule’s own SQL returned.