A SQL linter written in rust.
Actively maintained. Last release 4 weeks ago. A safe choice.
pip install sqruffsqruff
sqruff is a SQL linter and formatter written in Rust.
- Linting: advanced, configurable SQL linting
- Formatting: automated, configurable formatting
- Speed: fast and efficient
- Portability: easy to integrate into dev workflows
Try it in the browser: https://playground.quary.dev
Table of contents
Quickstart
Install (macOS)
brew install sqruff
For other platforms (pip, cargo, binary downloads), see the installation guide.
Lint a project
sqruff lint . --dialect postgres
Configure a project
Create a .sqruff file in your project root:
[sqruff]
dialect = postgres
Then run without the --dialect flag:
sqruff lint .
Editor integrations
sqruff ships an LSP server (sqruff lsp) usable from any editor. This repo
maintains two integrations:
- VS Code:
editors/code - Zed: