Documentation
¶
Overview ¶
Package sqlscope finds SQL statements that touch a pipeline-scoped table without naming pipeline_id, or a run-scoped one (run_id REFERENCES runs, no pipeline_id of its own) without naming pipeline_id or reaching runs. It lives in tools/ because it reads source, and its test is what holds each driver in internal/store to the rule CLAUDE.md states in prose.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Report ¶
Report is what a directory's source says: the findings, and how much was read — so a caller can tell "nothing wrong" from "nothing parsed".
func Check ¶
Check reads every non-test Go file in dir. The scoped tables come from the CREATE TABLE statements found there rather than from a list, so a new table is held to the rule the day it is created.
ponytail: "names pipeline_id somewhere", not "scopes every table it touches" — a join of two scoped tables with one predicate passes, and so does a statement whose only mention sits in a shared subquery. Upgrade to a real SQL parser if a review ever finds one of those; every unscoped statement found so far named it nowhere.