awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
sqlfluff avatar

sqlfluff/sqlfluff

0
View on GitHub↗
9,525 stars·942 forks·Python·mit·19 viewswww.sqlfluff.com↗

Sqlfluff

SQLFluff is a multi-dialect SQL linter, formatter, and style guide enforcer. It functions as a parser and analyzer that converts SQL scripts into structured trees to validate syntax, identify logical components, and enforce consistent capitalization, aliasing, and layout conventions across various database dialects.

The system is specifically designed to handle templated SQL, providing the ability to analyze, parse, and lint files containing macros or placeholders. It uses dummy-parameter rendering and source mapping to validate the style and correctness of dynamic code before it is rendered into final queries.

The project provides automated refactoring capabilities to correct linting violations programmatically. Its broader functional surface includes static analysis to detect redundant statements and inefficient database operations, as well as a plugin architecture for integrating custom linting rules and templating engines.

Users can manage the tool through a command-line interface to list active linting rules and supported database dialects.

Features

  • SQL Parsers - Provides a multi-dialect parser that converts SQL scripts into structured trees to validate syntax and identify logical components.
  • SQL Formatters - Automatically corrects indentation, capitalization, and whitespace in SQL files for consistent visual style.
  • Code Formatting and Linting - Automatically corrects style and structural violations to align SQL code with configured standards.
  • Templated SQL Analyzers - Parses and lints SQL files containing macros or placeholders before they are rendered by a template engine.
  • Static Template Analysis - Evaluates files containing placeholders or macros using dummy parameters to validate style and correctness.
  • Templated SQL Validators - Checks the syntax and style of SQL files containing macros or placeholders before they are rendered into final queries.
  • Query Style Standardizers - Enforces consistent naming conventions, aliasing standards, and structural patterns to improve the maintainability of shared database scripts.
  • SQL Abstract Syntax Tree Parsing - Converts SQL code into abstract syntax trees to enable programmatic analysis and rendering in various formats.
  • Template-Aware Parsing - Processes files containing format strings to lint the underlying code before it is rendered.
  • Automated Tree Transformations - Applies programmatic edits, inserts, or deletions to a structured tree to correct rule violations.
  • Style Guide Enforcers - Employs a rule-based engine to standardize capitalization, aliasing, and layout conventions across large database codebases.
  • Template Analysis - Processes templates through various engines to map linting issues back to original source positions.
  • SQL Templating Engines - Processes SQL files through a templater to produce the final rendered output.
  • SQL Dialect Adapters - Swaps parser logic based on the selected SQL variety to handle varying syntax rules and keywords across dialects.
  • SQL Converters - Converts code from format strings into valid SQL to enable analysis for linting errors.
  • SQL Query Structure Validators - Detects structural issues such as unused common table expressions, redundant statements, and ambiguous groupings.
  • Template Source Mappers - Tracks the position of elements through the templating process to map linting errors back to the original source file.
  • Casing Standards - Ensures consistent casing for keywords, unquoted identifiers, function names, and data types.
  • AST-Based Refactorers - Modifies the internal parse tree to apply automated fixes and renders the result back into formatted source code.
  • Coding Standards Enforcement - Enforces project guidelines regarding how tables and columns are aliased using explicit keywords.
  • Plugin Architectures - Integrates custom linting rules and templating engines through a defined hook-based plugin architecture.
  • Rule-Based Plugin Systems - Provides a standard interface for creating modular, toggleable linting rules via a plugin system.
  • Dummy-Parameter Renderers - Processes templated SQL using placeholder values to validate syntax before execution in a real environment.
  • Database Tools - Modular SQL linter and auto-formatter.
  • Code Review Tools - Configurable linter for SQL code and ELT applications.
  • Developer Tools - SQL linter that supports dbt and Jinja.
  • SQL Analysis and Linting - Configurable SQL linter with support for multiple dialects.

Star history

Star history chart for sqlfluff/sqlfluffStar history chart for sqlfluff/sqlfluff

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Sqlfluff

These projects share indexed features with Sqlfluff. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • tobymao/sqlglottobymao avatar

    tobymao/sqlglot

    9,336View on GitHub↗

    sqlglot is a SQL parser and transpiler that represents queries as abstract syntax trees to enable structural analysis, modification, and semantic transformation. It functions as a dialect translator and query optimizer, converting SQL code between different database engines and simplifying syntax trees through rule-based normalization. The project provides a framework for defining custom SQL dialects by overriding tokenizers, parsers, and generators. It includes a lineage analyzer to track data flow from source tables through complex queries to identify the origin of specific columns. Additi

    Python
    View on GitHub↗9,336
  • go-xorm/xormgo-xorm avatar

    go-xorm/xorm

    6,628View on GitHub↗

    xorm is a relational mapper and object-relational mapping tool for Go. It translates Go structures into SQL queries and maps database rows back into native objects, providing a multi-dialect database driver that supports MySQL, PostgreSQL, SQLite, Oracle, SQL Server, and TiDB. The project features a read-write splitting manager that routes modification requests to a primary database and read requests to replicas. It includes a database schema synchronizer to automatically align table structures and indexes with application data models, as well as a fluent SQL query builder for constructing co

    Gogolangmssqlmysql
    View on GitHub↗6,628
  • analysis-tools-dev/static-analysisanalysis-tools-dev avatar

    analysis-tools-dev/static-analysis

    14,389View on GitHub↗

    This project is a comprehensive, curated directory of static analysis, linting, and security scanning utilities. It serves as a central resource for developers to discover, compare, and select tools based on specific programming languages, licensing models, and integration requirements. The directory distinguishes itself by providing deep metadata for each listed utility, including community-driven popularity rankings, maintenance status, and deployment methods. By aggregating these tools into a single searchable index, it enables teams to identify solutions for enforcing coding standards, ma

    Rustanalysisawesome-listcode-quality
    View on GitHub↗14,389
  • checkstyle/checkstylecheckstyle avatar

    checkstyle/checkstyle

    8,867View on GitHub↗

    Checkstyle is a Java static analysis tool and linter designed to identify and enforce coding standards and best practices. It functions as a code quality auditor and Javadoc validation tool, checking source code against configurable rulesets to ensure structural and stylistic consistency. The project allows for the creation of custom linting rules by extending a core API to inspect the abstract syntax tree. It further enables specialized validation through the use of XPath expressions to query the syntax tree for specific code patterns and violations. Capability areas include the enforcement

    Javacode-qualitycommand-line-toolhacktoberfest
    View on GitHub↗8,867
Compare all 30 related projects→

Frequently asked questions

What does sqlfluff/sqlfluff do?

SQLFluff is a multi-dialect SQL linter, formatter, and style guide enforcer. It functions as a parser and analyzer that converts SQL scripts into structured trees to validate syntax, identify logical components, and enforce consistent capitalization, aliasing, and layout conventions across various database dialects.

What are the main features of sqlfluff/sqlfluff?

The main features of sqlfluff/sqlfluff are: SQL Parsers, SQL Formatters, Code Formatting and Linting, Templated SQL Analyzers, Static Template Analysis, Templated SQL Validators, Query Style Standardizers, SQL Abstract Syntax Tree Parsing.

Which projects share features with sqlfluff/sqlfluff?

Projects with overlapping indexed features include: tobymao/sqlglot — sqlglot is a SQL parser and transpiler that represents queries as abstract syntax trees to enable structural analysis,… go-xorm/xorm — xorm is a relational mapper and object-relational mapping tool for Go. It translates Go structures into SQL queries… analysis-tools-dev/static-analysis — This project is a comprehensive, curated directory of static analysis, linting, and security scanning utilities. It… checkstyle/checkstyle — Checkstyle is a Java static analysis tool and linter designed to identify and enforce coding standards and best… apache/shardingsphere — ShardingSphere is a distributed SQL database middleware that provides sharding, read-write splitting, and distributed… xiaomi/soar — Soar is a suite of specialized tools designed for analyzing MySQL performance, advising on indexing, and optimizing…