LinthelmIntroductions to linters, static analysis and code-quality tools

Linters · 5 tools

Top 5 SQL and data pipeline code quality tools for linting and auto-fixing SQL in dbt and analytics repos

By the Linthelm editorial team · Published · Updated · Facts checked 21 November 2026 (Asia/Dhaka)

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.

At a glance: the shortlist in order of fit for this use case
#ToolBest forKey featurePlatforms / deploymentPricingMore
1SQLFluffSQLFluffConsistent SQL style in dbt and ELT projectsAutomatically fixes most linting errorsInstalled from PyPI with pip or another Python package manager; command-line interfaceSee vendor pricing pageIntroduction
2yamllintyamllintKeeping YAML configuration files tidyChecks key repetition and cosmetic issuesInstalled with pip; packaged for all major operating systemsSee vendor pricing pageIntroduction
3RuffAstralLinting and formatting Python code in analytics reposOver 900 built-in rulesCommand line and first-party editor integrations including VS Code; language serverSee vendor pricing pageOfficial site
4SonarQubeSonarTeams wanting quality gates on pull requestsAnalyzes branches and pull requests across 45+ languagesManaged cloud (SonarQube Cloud) or self-hosted (SonarQube Server); pull request results on major Git platforms; common editorsSee vendor pricing pageIntroduction
5CodacyCodacyEngineering teams applying one policy across projectsGlobal policy applied across all projectsIntegrates with agents, IDEs, Git, Jira and SlackSee vendor pricing pageOfficial 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)

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)

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)

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.

Sources. Facts on this page come from each vendor's official pages, checked on the dates shown (Asia/Dhaka):

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.