SQL

The Best SQL Static Analysis Tools (Linters/Formatters)

We rank 27 SQL linters, code analyzers, formatters, and more. Find and compare tools like Mega-Linter, Sigrid, SQLFluff, and more. Please rate and review tools that you've used. This helps others find the best tools for their projects.

14 SQL Tools

18

SQLFluff

Multiple dialect SQL linter and formatter.

  • MaintainedMaintained
  • MaintainedSql
  • Maintainedcli
  • MaintainedlinterMaintainedformatter
  • 78% upvoted
2

tsqllint

T-SQL-specific linter.

  • MaintainedMaintained
  • MaintainedSql
  • Maintainedcli
  • Maintainedlinter
  • 63% upvoted
1

holistic

More than 1,300 rules to analyze SQL queries. Takes an SQL schema definition and the query source code to generate improvement recommendations. Detects code smells, unused indexes, unused tables, views, materialized views, and more.

  • MaintainedMaintained
  • MaintainedSql
  • Maintainedservice
  • Maintainedlinter
  • 67% upvoted
0

Bytebase

Database DevSecOps platform with a built-in SQL Review engine that lints schema migrations and queries against 100+ configurable rules — naming conventions, anti-patterns, and safety checks — across MySQL, PostgreSQL, Oracle, SQL Server, Snowflake, and more.

  • MaintainedMaintained
  • MaintainedSql
  • MaintainedguiMaintainedservice
  • Maintainedlinter
  • 0% upvoted
0

dbcritic

dbcritic finds problems in a database schema, such as a missing primary key constraint in a table.

  • MaintainedMaintained
  • MaintainedSql
  • Maintainedcli
  • Maintainedlinter
  • 50% upvoted
0

pgspot

Spot vulnerabilities in postgres extension scripts. Finds unsafe search_path usage and unsafe object creation in PostgreSQL extension scripts or any other PostgreSQL SQL code.

  • MaintainedMaintained
  • MaintainedSql
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted
0

scythe

Polyglot SQL compiler and linter that generates type-safe code from SQL with schema-aware linting.

  • MaintainedMaintained
  • MaintainedSql
  • Maintainedcli
  • Maintainedlinter
  • 0% upvoted
0

squawk

Linter for PostgreSQL, focused on migrations. Prevents unexpected downtime caused by database migrations and encourages best practices around Postgres schemas and SQL.

  • MaintainedMaintained
  • MaintainedSql
  • Maintainedcli
  • Maintainedlinter
  • 50% upvoted
0

Visual Expert

Code analysis for PowerBuilder, Oracle, and SQL Server Explores, analyzes, and documents Code

  • MaintainedMaintained
  • MaintainedSql
  • Maintainedservice
  • Maintainedlinter
  • 0% upvoted
0

WhiteHat Sentinel Dynamic

Part of the WhiteHat Application Security Platform. Dynamic application security scanner that covers the OWASP Top 10.