Format SQL for Pull Request Reviews
Clean up SQL queries before committing to make them readable in code reviews.
Formatted SQL appears here…Code Review tips
A one-line SELECT query becomes unreadable past 80 characters. Format it before commit so reviewers see clean, indented SQL.
Established SQL style guides (Google, Mozilla) put major clauses on their own lines. The default settings here follow that convention.
For team consistency, document your preferred case (uppercase keywords is most common) and indent (2 vs 4 spaces) in your style guide.
Sådan fungerer det
Hvorfor bruge vores?
Also check out…
Format SQL to Find Bugs
Formatting reveals structural issues like missing
Format SQL for Documentation
Make SQL examples in your docs, blog posts, or tut
Format ORM-Generated SQL
ORMs (Sequelize, Prisma, ActiveRecord) produce sin
Format Reporting Queries
Big analytical SQL queries become unmanageable wit
