sqruff
sqruff is a fast SQL linter and formatter written in Rust that supports multiple SQL dialects including PostgreSQL, BigQuery, Snowflake, and ClickHouse. It provides configurable linting rules, automated formatting, and easy integration into development workflows via CLI or browser playground.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | quarylabs/sqruff |
| Owner | quarylabs |
| Primary language | Rust |
| License | Apache-2.0 — OSI-approved |
| Stars | 1.3k |
| Forks | 67 |
| Open issues | 65 |
| Latest release | v0.39.0 (2026-07-03) |
| Last updated | 2026-07-08 |
| Source | https://github.com/quarylabs/sqruff |
What sqruff is
Rust-based SQL parser and AST processor offering dialect-aware linting (65 open issues suggest active rule refinement), configurable formatting via .sqruff config files, and CLI tooling. Supports ANSI and vendor-specific SQL syntax across at least four major data warehouse dialects.
Get the sqruff source
Clone the repository and explore it locally.
git clone https://github.com/quarylabs/sqruff.gitcd sqruff# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Install via brew (macOS), pip, cargo, or precompiled binary; verify installation method matches your deployment target OS and architecture.
- Create `.sqruff` configuration at project root specifying dialect; rule defaults may differ by dialect, so validate on a sample codebase before full rollout.
- Integrate into CI pipelines (e.g., GitHub Actions, GitLab CI) as a lightweight linting step; Rust binary is performant but ensure binary is cached to avoid repeated downloads.
- Customize linting rules via config file; document rule set per team to avoid surprise violations in code review.
- Plan for version upgrades; pre-1.0 releases may introduce breaking changes to CLI or config syntax. Test upgrade path in non-prod environment first.
When to avoid it — and what to weigh
- Require guaranteed 100% dialect coverage — sqruff explicitly supports only listed dialects (PostgreSQL, BigQuery, Snowflake, ClickHouse, ANSI). If you use niche or proprietary SQL variants not listed, behavior is Unknown.
- Need production-grade semantic validation — sqruff lints syntax and style; it does not perform semantic checks (e.g., column existence, type inference). For data quality guarantees, pair with a data cataloging or validation tool.
- Depend on established enterprise support contract — Project is open-source with 65 open issues and community-driven. No SLA, commercial support tier, or guarantee of timely fixes for critical bugs is documented.
- Require immutable, long-term rule stability — v0.39.0 signals pre-1.0 maturity; rule definitions, CLI flags, and config format may change between releases. Heavy customization may require ongoing maintenance burden.
License & commercial use
Apache License 2.0 (Apache-2.0), a permissive OSI-approved license. Allows commercial use, modification, and distribution under standard Apache terms (include license, state changes, provide NOTICE).
Apache-2.0 permits commercial deployment and integration without royalty. No commercial support tier, SLA, or proprietary restrictions are documented. Verify your legal team confirms this meets compliance obligations for your use case, especially if you modify the software or bundle it with proprietary code.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
sqruff is a linter that parses and analyzes user-provided SQL text; it does not execute SQL. Primary risk is denial-of-service (pathological SQL grammar causing parser hang). No public vulnerability disclosures found in the data provided. For sensitive environments, review code audit if available and monitor GitHub issues for security reports. Apache-2.0 license provides no liability indemnification.
Alternatives to consider
sqlfluff (Python-based)
Mature, language-agnostic SQL linter with broader dialect support and larger community. Slower than sqruff but established documentation and plugin ecosystem. Consider if Rust binary compatibility or performance is not a blocker.
Prettier (with SQL plugins)
General-purpose code formatter with growing SQL support. Lighter-weight for simple formatting workflows but less specialized linting. Better if your team standardizes on Prettier for multiple languages.
Vendor-provided linters (e.g., BigQuery Best Practices Guide, Snowflake documentation)
Free, platform-specific checks but manual enforcement and no CLI. Combine with sqruff for comprehensive coverage if vendor rules are not yet automated in sqruff.
Build on sqruff with DEV.co software developers
Evaluate sqruff in your CI/CD pipeline. Start with the browser playground, then integrate the CLI into your data platform for consistent, automated SQL linting.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
sqruff FAQ
Does sqruff execute SQL or just parse it?
Can I use sqruff with dbt or other data tools?
What happens if I upgrade sqruff and my rules break?
Is sqruff suitable for production SQL validation in a data platform?
Software developers & web developers for hire
Need help beyond evaluating sqruff? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source databases integrations — and maintain them long-term.
Ready to standardize your SQL?
Evaluate sqruff in your CI/CD pipeline. Start with the browser playground, then integrate the CLI into your data platform for consistent, automated SQL linting.