Skip to content

Commit c4c32f3

Browse files
adding sqlfluff
1 parent c93cfc7 commit c4c32f3

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

Diff for: docs/tools/sqlfluff.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: SQLFluff
3+
sidebar_label: SQLFluff
4+
description: CodeRabbit's guide to SQLFluff.
5+
---
6+
7+
```mdx-code-block
8+
import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx';
9+
10+
<ProPlanNotice />
11+
```
12+
13+
[SQLFluff](https://github.com/sqlfluff/sqlfluff) is a SQL linter and auto-formatter for standardizing SQL code.
14+
15+
## Files
16+
17+
SQLFluff will run on files with the following extensions:
18+
19+
- `.sql`
20+
21+
## Configuration
22+
23+
SQLFluff supports the following config files:
24+
25+
- 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.
26+
- `setup.cfg`
27+
- `tox.ini`
28+
- `pep8.ini`
29+
- `.sqlfluff`
30+
- `pyproject.toml`
31+
32+
:::note
33+
34+
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.
35+
36+
:::
37+
38+
## Links
39+
40+
- [SQLFluff Configuration](https://docs.sqlfluff.com/en/stable/configuration.html)
41+
- [SQLFluff Rules Reference](https://docs.sqlfluff.com/en/stable/rules.html)

Diff for: docs/tools/tools.md

+2
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,15 @@ Remove extraneous f prefix
7070
| Ruby | [RuboCop][RuboCop] | Code Quality |
7171
| Semgrep | [Semgrep][Semgrep] | Code Security |
7272
| Shell (sh, bash, ksh, dash) | [ShellCheck][ShellCheck] | Code Quality |
73+
| SQL | [SQLFluff][SQLFluff] | Code Quality |
7374
| Swift | [SwiftLint][SwiftLint] | Code Quality |
7475
| Terraform | [Checkov][Checkov] | Code Security |
7576
| TSX | [Biome][Biome] | Code Quality |
7677
| Typescript | [Biome][Biome] | Code Quality |
7778
| YAML | [YAMLlint][YAMLlint] | Code Quality |
7879

7980
[ShellCheck]: ./shellcheck.md
81+
[SQLFluff]: ./sqlfluff.md
8082
[Ruff]: ./ruff.md
8183
[markdownlint]: ./markdownlint.md
8284
[LanguageTool]: ./languagetool.md

0 commit comments

Comments
 (0)