Usage
Once installed, describe what you want in plain language — the agent picks the right dblinter command and flags:
| You ask for… | The agent runs… |
|---|---|
| ”Lint my SQL” | dblinter check --outputFormats=sarif |
| ”Just check the files I changed” / “check src/packages/“ | dblinter check --outputFormats=sarif <paths...> |
| ”Only check new code compared to main” | dblinter check --outputFormats=sarif --newCodeOnly=true --referenceBranch=main $(git diff --name-only --diff-filter=ACMR --relative main) |
| ”Run the SQL-based tests” | dblinter test --outputFormats=junit |
| ”Is dbLinter installed?” | dblinter version |
| ”Fix the issues dbLinter found” | parses the report, proposes fixes per file, then re-checks just the changed file(s) |
--newCodeOnly does not restrict the scanned files, so pass changed paths explicitly.
--relative keeps paths correct when running from a subdirectory.
Choose the intended reference: the local branch main and the remote-tracking ref origin/main can differ.
For the full command reference behind these, see check,
test, and version.