https://github.com/quarylabs/sqruff
Fast SQL formatter/linter
https://github.com/quarylabs/sqruff
ansi bigquery clickhouse linter rust snowflake sql
Last synced: 2 days ago
JSON representation
Fast SQL formatter/linter
- Host: GitHub
- URL: https://github.com/quarylabs/sqruff
- Owner: quarylabs
- License: apache-2.0
- Created: 2023-02-13T19:36:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2026-02-09T09:41:47.000Z (29 days ago)
- Last Synced: 2026-02-09T14:38:14.593Z (29 days ago)
- Topics: ansi, bigquery, clickhouse, linter, rust, snowflake, sql
- Language: Rust
- Homepage: https://playground.quary.dev/docs
- Size: 11.1 MB
- Stars: 1,194
- Watchers: 4
- Forks: 52
- Open Issues: 94
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-clickhouse - quarylabs/sqruff - sqruff is a fast and customizable SQL formatter and linter supporting multiple SQL dialects including Clickhouse, designed to ensure SQL code quality and consistency across development workflows. (Language bindings / Rust)
- awesome-sql - sqruff - A SQL linter and formatter written in Rust that supports various SQL dialects and integrates with VSCode through a plugin. (<a name="tools"></a>Tools)
- awesome-sql - sqruff - A SQL linter and formatter written in Rust that supports various SQL dialects and integrates with VSCode through a plugin. (Tools)
README
`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
## Quickstart
### Install (macOS)
```bash
brew install sqruff
```
For other platforms (pip, cargo, binary downloads), see the [installation guide](https://playground.quary.dev/docs/getting-started/installation/).
### Lint a project
```bash
sqruff lint . --dialect postgres
```
### Configure a project
Create a `.sqruff` file in your project root:
```ini
[sqruff]
dialect = postgres
```
Then run without the `--dialect` flag:
```bash
sqruff lint .
```
## Documentation
Full documentation: [playground.quary.dev/docs](https://playground.quary.dev/docs/)
Key entry points:
- [Installation](https://playground.quary.dev/docs/getting-started/installation/)
- [Usage](https://playground.quary.dev/docs/usage/lint/)
- [Configuration](https://playground.quary.dev/docs/usage/configuration/)
- [Rules](https://playground.quary.dev/docs/reference/rules/)
- [CLI reference](https://playground.quary.dev/docs/reference/cli/)