From c4c32f3252b5332c41d1163df06f6756f956ad48 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 26 Mar 2025 16:23:22 -0400 Subject: [PATCH] adding sqlfluff --- docs/tools/sqlfluff.md | 41 +++++++++++++++++++++++++++++++++++++++++ docs/tools/tools.md | 2 ++ 2 files changed, 43 insertions(+) create mode 100644 docs/tools/sqlfluff.md diff --git a/docs/tools/sqlfluff.md b/docs/tools/sqlfluff.md new file mode 100644 index 00000000..9eb959f7 --- /dev/null +++ b/docs/tools/sqlfluff.md @@ -0,0 +1,41 @@ +--- +title: SQLFluff +sidebar_label: SQLFluff +description: CodeRabbit's guide to SQLFluff. +--- + +```mdx-code-block +import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx'; + + +``` + +[SQLFluff](https://github.com/sqlfluff/sqlfluff) is a SQL linter and auto-formatter for standardizing SQL code. + +## Files + +SQLFluff will run on files with the following extensions: + +- `.sql` + +## Configuration + +SQLFluff supports the following config files: + +- User-defined config file set at `reviews.tools.sqlfluff.config_file` in your project's `.coderabbit.yaml` file or setting the "Review → Tools → SQLFluff → Config File" field in CodeRabbit's settings page. +- `setup.cfg` +- `tox.ini` +- `pep8.ini` +- `.sqlfluff` +- `pyproject.toml` + +:::note + +CodeRabbit will only run SQLFluff if your repository contains a SQLFluff config file. This config must use one of the default file names listed above, or you must define the path to this file in the `.coderabbit.yaml` or config UI. + +::: + +## Links + +- [SQLFluff Configuration](https://docs.sqlfluff.com/en/stable/configuration.html) +- [SQLFluff Rules Reference](https://docs.sqlfluff.com/en/stable/rules.html) diff --git a/docs/tools/tools.md b/docs/tools/tools.md index 523614d3..00a3efc2 100644 --- a/docs/tools/tools.md +++ b/docs/tools/tools.md @@ -70,6 +70,7 @@ Remove extraneous f prefix | Ruby | [RuboCop][RuboCop] | Code Quality | | Semgrep | [Semgrep][Semgrep] | Code Security | | Shell (sh, bash, ksh, dash) | [ShellCheck][ShellCheck] | Code Quality | +| SQL | [SQLFluff][SQLFluff] | Code Quality | | Swift | [SwiftLint][SwiftLint] | Code Quality | | Terraform | [Checkov][Checkov] | Code Security | | TSX | [Biome][Biome] | Code Quality | @@ -77,6 +78,7 @@ Remove extraneous f prefix | YAML | [YAMLlint][YAMLlint] | Code Quality | [ShellCheck]: ./shellcheck.md +[SQLFluff]: ./sqlfluff.md [Ruff]: ./ruff.md [markdownlint]: ./markdownlint.md [LanguageTool]: ./languagetool.md