Skip to content

Commit 189c34e

Browse files
committed
docs: say which dialects check, fix and format read
A T-SQL, BigQuery or other unread file is reported as unavailable; the configuration page now names the dialects each command reads.
1 parent 82630bc commit 189c34e

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

‎crates/sqlclean-cli/skill/references/docs/configuration.md‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,19 @@ SELECT [order id] FROM orders
123123
error[SQLCLEAN999]: SQL could not be parsed as duckdb: Parse error at line 1, column 17: Expected RBracket, got Var ('id') near [SELECT [order id] FROM orders]
124124
```
125125

126-
SQLClean reads SQL with SQLQuack's parsers. A file in a dialect SQLQuack does not parse yet, such
127-
as `mysql`, is not checked, fixed or formatted: `check` reports it once as a warning (in JSON, under
128-
`unavailable`), and it never fails a command or counts as a problem.
126+
SQLClean reads SQL with SQLQuack's parsers. `check` and `fix` read `duckdb`, `generic`, `postgres`,
127+
`snowflake` and `sqlite` files, and `format` lays out `duckdb` and `snowflake` files; a `generic`,
128+
`postgres` or `sqlite` file is checked and fixed but left as written by `format`. A file in any
129+
other dialect, such as `mysql` or `tsql`, is not checked, fixed or formatted: `check` reports it once
130+
as a warning (in JSON, under `unavailable`), `format` leaves it unchanged with a warning, and it
131+
never fails a command or counts as a problem.
129132

130133
```text
131134
warning: SQL lint is unavailable for the mysql dialect: SQLQuack does not parse it yet
132135
--> reports/q.sql
133136
```
134137

135-
Supported dialects, case-insensitive:
138+
Dialect names SQLClean accepts, case-insensitive:
136139

137140
| Dialect | Also accepted |
138141
|---------|---------------|

‎website/src/content/docs/docs/configuration.mdx‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,16 +112,19 @@ SELECT [order id] FROM orders
112112
error[SQLCLEAN999]: SQL could not be parsed as duckdb: Parse error at line 1, column 17: Expected RBracket, got Var ('id') near [SELECT [order id] FROM orders]
113113
```
114114

115-
SQLClean reads SQL with SQLQuack's parsers. A file in a dialect SQLQuack does not parse yet, such
116-
as `mysql`, is not checked, fixed or formatted: `check` reports it once as a warning (in JSON, under
117-
`unavailable`), and it never fails a command or counts as a problem.
115+
SQLClean reads SQL with SQLQuack's parsers. `check` and `fix` read `duckdb`, `generic`, `postgres`,
116+
`snowflake` and `sqlite` files, and `format` lays out `duckdb` and `snowflake` files; a `generic`,
117+
`postgres` or `sqlite` file is checked and fixed but left as written by `format`. A file in any
118+
other dialect, such as `mysql` or `tsql`, is not checked, fixed or formatted: `check` reports it once
119+
as a warning (in JSON, under `unavailable`), `format` leaves it unchanged with a warning, and it
120+
never fails a command or counts as a problem.
118121

119122
```text
120123
warning: SQL lint is unavailable for the mysql dialect: SQLQuack does not parse it yet
121124
--> reports/q.sql
122125
```
123126

124-
Supported dialects, case-insensitive:
127+
Dialect names SQLClean accepts, case-insensitive:
125128

126129
| Dialect | Also accepted |
127130
|---------|---------------|

0 commit comments

Comments
 (0)