Save time and auto fix your SQL code.
SQLFluff (opens in a new tab) is a SQL linter that improves your SQL code quality and development workflow. The key benefits of SQLFluff are:
SQL Linting: SQLFluff helps find issues in your SQL code to enforce a consistent code style and early detection of errors. This ensures better alignment within your team, as everyone follows the same code style.
Auto-Fixing: You can activate an automatic fix for most issues detected in the linting. This feature helps you save time and stay focused on coding.
SQLFluff analyzes the code for a set of predefined rules such as syntax errors, undefined variables, unused variables, type inconsistencies, unreachable code, unused imports, code formatting, or configurable custom rules.
SQLFluff can automatically fix your SQL code by handling indentation, line breaks, capitalization, and other formatting rules. To activate the formatting of your SQL file, you have two options:
- Use the keyboard shortcut SHIFT + CMD / CTRL + F in the data catalog.
- Use the keyboard shortcut SHIFT + OPT / ALT + F or right-click on the page in the code editor.
You can customize SQLFluff rules by adding a
.sqlfluff file at the root level of your project. Here's an example:
Refer to the complete list of SQLFluff rules (opens in a new tab) for more details.