Skip to content

CICD-089 · Check SQL formatting ​

Encyclopedia · Tests and quality checks · All snippets

Previous · CICD-088 · Next · CICD-090

1. Where it fits ​

  • Placement Bash run step following checkout, or equivalent lab terminal.
  • Prerequisites repository with test fixtures and task-specific quality dependencies.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
sqlfluff lint --dialect postgres migrations/

3. How it works ​

SQLFluff parses policy rules against the PostgreSQL dialect. Other database modes can incorrectly flag valid migration syntax.

4. Verify the result ​

Set the SQL dialect and templater to match the migration code.

Validation syntax-validated (Bash parse). Status definitions.