SQL style drift rarely comes from one bad decision. It comes from a hundred small ones: one developer's editor inserts two spaces after SELECT , another aligns joins differently, and a third commits a query that was formatted by a tool nobody else has installed. The pull request then contains a mix of logic changes and whitespace churn, and reviewers spend their attention on spacing instead of correctness.
Format-on-save is a personal setting, not a team policy. The reliable fix is to run the same formatter with the same configuration at two shared points: before each commit, and on every pull request.
This tutorial builds that setup with SQLFluff, a configurable SQL linter and formatter, plus pre-commit and GitHub Actions.…