Skip to main content
SQLBuild owns SQL lint and formatting behavior. It uses the active adapter dialect and understands SQLBuild model headers, so no Sqruff or SQLFluff installation is required. Use sqb fix --check or sqb format --check in CI. Add --diff to preview changes without writing them. All three commands accept normal --select, --select-file, and --exclude scopes.

Rule policy

Core rules run by default. Optional rules are enabled in project configuration by exact code or prefix:
Lint codes use the SQBL prefix. Formatting owns presentation choices such as capitalization, indentation, spacing, commas, and canonical SQL spelling; these are not inflated into lint warnings. Kata remains separate and evaluates repository architecture and naming policy over compiled models.

Suppressions

Suppress a local diagnostic only with a reason:
Unused or malformed suppressions produce SQBL000. Mandatory compiler and model-header faults cannot be suppressed. Prefer fixing the SQL or narrowing optional policy before adding a suppression.

Safe fixes

sqb fix changes only findings with a deterministic equivalent rewrite. Diagnostics that require schema knowledge or author intent remain reported and are never guessed. Review the diff before committing, especially when enabling additional optional rules. See sqb lint, sqb fix, and sqb format.