Linters · 5 tools
Top 5 SQL and data pipeline code quality tools for linting and auto-fixing SQL in dbt and analytics repos
For data engineers and analytics engineers, SQLFluff is the natural starting point for linting and auto-fixing SQL in dbt projects, followed by yamllint for YAML configuration and Ruff for Python code. SonarQube and Codacy come last as broader platforms for teams that want central quality gates or policies across repositories. This shortlist is for people who keep SQL, YAML and Python together in one analytics repo.
| # | Tool | Best for | Key feature | Platforms / deployment | Pricing | More |
|---|---|---|---|---|---|---|
| 1 | SQLFluffSQLFluff | Consistent SQL style in dbt and ELT projects | Automatically fixes most linting errors | Installed from PyPI with pip or another Python package manager; command-line interface | See vendor pricing page | Introduction |
| 2 | yamllintyamllint | Keeping YAML configuration files tidy | Checks key repetition and cosmetic issues | Installed with pip; packaged for all major operating systems | See vendor pricing page | Introduction |
| 3 | RuffAstral | Linting and formatting Python code in analytics repos | Over 900 built-in rules | Command line and first-party editor integrations including VS Code; language server | See vendor pricing page | Official site |
| 4 | SonarQubeSonar | Teams wanting quality gates on pull requests | Analyzes branches and pull requests across 45+ languages | Managed cloud (SonarQube Cloud) or self-hosted (SonarQube Server); pull request results on major Git platforms; common editors | See vendor pricing page | Introduction |
| 5 | CodacyCodacy | Engineering teams applying one policy across projects | Global policy applied across all projects | Integrates with agents, IDEs, Git, Jira and Slack | See vendor pricing page | Official site |
1 SQLFluff
By SQLFluff
SQLFluff is an open source, dialect-flexible and configurable SQL linter that works with Jinja templating and dbt. It automatically fixes most linting errors.
Why it is here: It sits first because it is the only tool here built specifically for SQL, and it was designed with ELT applications and dbt in mind.
- Best for
- Consistent SQL style in dbt and ELT projects
- Key features
- Automatically fixes most linting errors
- Works with Jinja templating and dbt
- Parses SQL to catch syntax issues without database access
- Supports a range of SQL dialects through configuration
- Opinionated defaults plus flexible configuration
- Limits
- It is documented as a SQL linter, so YAML and Python files in the same repo need other tools. SQLFluff 4.0 began introducing Rust implementations of the lexer and parser, so teams should read the vendor documentation for current details.
- Platforms / deployment
- Installed from PyPI with pip or another Python package manager; command-line interface
- Pricing
- See vendor pricing page (not quoted here; facts checked 21 November 2026, Asia/Dhaka)
Official website (sqlfluff.com) · Read our introduction to SQLFluff
2 yamllint
By yamllint
yamllint is a linter for YAML files that checks syntax validity as well as quirks and cosmetic problems such as line length, trailing spaces and indentation.
Why it is here: It follows SQLFluff because dbt-style repos typically hold YAML configuration next to SQL, and yamllint covers that file type directly.
- Best for
- Keeping YAML configuration files tidy
- Key features
- Checks key repetition and cosmetic issues
- Pre-defined configurations such as relaxed, plus custom config files
- Rule levels can be set to warning or disabled
- Special comments disable checks for a line or block
- Parsable output format for editor syntax checking
- Limits
- It lints YAML only. The official pages do not mention dbt-specific schema checks, so teams should confirm what they need in the vendor documentation.
- Platforms / deployment
- Installed with pip; packaged for all major operating systems
- Pricing
- See vendor pricing page (not quoted here; facts checked 21 November 2026, Asia/Dhaka)
Official website (github.com/adrienverge/yamllint) · Read our introduction to yamllint
3 Ruff
By Astral
Ruff is a Python linter and code formatter written in Rust, backed by Astral. It can replace several Python tools behind a single interface.
Why it is here: It sits third because it covers the Python scripts and models around SQL, with linting and formatting in one tool.
- Best for
- Linting and formatting Python code in analytics repos
- Key features
- Over 900 built-in rules
- Drop-in parity with Flake8, isort and Black
- Automatically fixes some errors
- Built-in support for Jupyter Notebooks
- Language server with real-time diagnostics
- Limits
- It is documented for Python only and does not lint SQL. Speed claims are the vendor's own, so teams should check the vendor documentation.
- Platforms / deployment
- Command line and first-party editor integrations including VS Code; language server
- Pricing
- See vendor pricing page (not quoted here; facts checked 21 November 2026, Asia/Dhaka)
4 SonarQube
By Sonar
SonarQube is a code quality and security platform that automates reviews of human-written and AI-generated code. It is available as managed cloud or self-hosted server.
Why it is here: It comes fourth because it is a central platform with quality gates, which suits teams that want merge checks across languages rather than a SQL-specific linter.
- Best for
- Teams wanting quality gates on pull requests
- Key features
- Analyzes branches and pull requests across 45+ languages
- Quality gates decide what merges and record every check
- AI CodeFix suggests fixes
- Secrets detection in the IDE, commits and pull requests
- Server edition can run self-managed, including air-gapped
- Limits
- The pages we checked do not name SQL or dbt specifically, so teams should confirm coverage in the vendor documentation. SCA requires SonarQube Advanced Security.
- Platforms / deployment
- Managed cloud (SonarQube Cloud) or self-hosted (SonarQube Server); pull request results on major Git platforms; common editors
- Pricing
- See vendor pricing page (not quoted here; facts checked 21 November 2026, Asia/Dhaka)
Official website (sonarsource.com/products/sonarqube) · Read our introduction to SonarQube
5 Codacy
By Codacy
Codacy is a platform for governing code quality, security and AI coding policies from one place. Standards are defined once and applied across all projects.
Why it is here: It closes the list because it is a policy layer across many repositories rather than a tool aimed at SQL or analytics code.
- Best for
- Engineering teams applying one policy across projects
- Key features
- Global policy applied across all projects
- AI code review on pull requests with false-positive detection
- Test coverage tracking
- Supports 49 programming languages and frameworks
- Scans through Git webhooks with no CI pipeline setup required
- Limits
- The pages we checked do not name SQL or dbt specifically, so teams should confirm coverage in the vendor documentation.
- Platforms / deployment
- Integrates with agents, IDEs, Git, Jira and Slack
- Pricing
- See vendor pricing page (not quoted here; facts checked 21 November 2026, Asia/Dhaka)
How we chose these tools
We looked at fit with SQL and analytics repo workflows, documented capabilities such as auto-fixing and dbt support, and the platforms and deployment options each vendor describes. SQL-specific tools come first. Tools for the YAML and Python files that usually sit beside dbt models follow, then general platforms.
All facts come from official vendor pages, with check dates recorded. The order reflects editorial fit for this use case and is not a statement that any tool is better overall. The list is built from documentation rather than product trials, so where a page does not mention SQL or dbt, we say so and point you to the vendor documentation.
Order used in this guide: Ordered by SQL-specific depth, then general tools that cover surrounding YAML and Python code.
Frequently asked questions
What is a good SQL linter for dbt projects?
SQLFluff is an open source SQL linter that works with Jinja templating and dbt. It was designed with ELT applications in mind and automatically fixes most linting errors.
Can SQLFluff lint SQL without a database connection?
Yes. SQLFluff parses SQL to catch syntax issues without needing database access. It supports a range of SQL dialects through configuration.
How do I lint YAML files in an analytics repo?
yamllint checks YAML syntax validity and also flags key repetition and cosmetic issues like line length, trailing spaces and indentation. It can lint individual files or recursively lint a directory.
What can I use for Python code in a data pipeline repo?
Ruff is a Python linter and code formatter that offers drop-in parity with Flake8, isort and Black. It ships over 900 built-in rules and can automatically fix some errors.
- SQLFluff: sqlfluff.com — checked 21 November 2026
- yamllint: github.com/adrienverge/yamllint, github.com/about, github.com/features — checked 21 November 2026
- Ruff: docs.astral.sh/ruff, docs.astral.sh/ruff/editors/features — checked 21 November 2026
- SonarQube: sonarsource.com/products/sonarqube — checked 21 November 2026
- Codacy: codacy.com, codacy.com/about, codacy.com/security — checked 21 November 2026
Linthelm is independent and not affiliated with the vendors listed. No vendor paid for inclusion or position. Product names belong to their owners. Features and prices change; confirm details on each official website.