Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
242 changes: 121 additions & 121 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ similar = "2"
sqlclean = { path = "crates/sqlclean" }
sqlclean-lint = { path = "crates/sqlclean-lint", features = ["bigquery", "databricks", "duckdb", "postgres", "snowflake", "sqlite"] }
sqlclean-rules = { path = "crates/sqlclean-rules" }
# SQLQuack's formatter, and the tokens and trees it and the lint Rules read, which replace Polyglot.
sqlquack-fingerprint = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "9d74b31a8d4cb14aa98d994345d3c90167646c75", features = ["bigquery", "databricks", "duckdb", "postgres", "snowflake", "sqlite", "sqlserver"] }
sqlquack-format = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "9d74b31a8d4cb14aa98d994345d3c90167646c75", features = ["bigquery", "databricks", "duckdb", "postgres", "snowflake", "sqlserver"] }
sqlquack-parse = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "9d74b31a8d4cb14aa98d994345d3c90167646c75" }
sqlquack-semantics = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "9d74b31a8d4cb14aa98d994345d3c90167646c75" }
sqlquack-syntax = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "9d74b31a8d4cb14aa98d994345d3c90167646c75" }
sqlquack-tokenize = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "9d74b31a8d4cb14aa98d994345d3c90167646c75" }
sqlquack-syntax-sqlserver = { git = "https://github.com/sqlstack-io/sqlquack.git", rev = "9d74b31a8d4cb14aa98d994345d3c90167646c75" }
# SQLBabel's formatter, and the tokens and trees it and the lint Rules read, which replace Polyglot.
sqlbabel-fingerprint = { git = "https://github.com/sqlstack-io/sqlbabel.git", rev = "b7b8acba57c0a81b173d328cf7e246a927a6dd93", features = ["bigquery", "databricks", "duckdb", "postgres", "snowflake", "sqlite", "sqlserver"] }
sqlbabel-format = { git = "https://github.com/sqlstack-io/sqlbabel.git", rev = "b7b8acba57c0a81b173d328cf7e246a927a6dd93", features = ["bigquery", "databricks", "duckdb", "postgres", "snowflake", "sqlserver"] }
sqlbabel-parse = { git = "https://github.com/sqlstack-io/sqlbabel.git", rev = "b7b8acba57c0a81b173d328cf7e246a927a6dd93" }
sqlbabel-semantics = { git = "https://github.com/sqlstack-io/sqlbabel.git", rev = "b7b8acba57c0a81b173d328cf7e246a927a6dd93" }
sqlbabel-syntax = { git = "https://github.com/sqlstack-io/sqlbabel.git", rev = "b7b8acba57c0a81b173d328cf7e246a927a6dd93" }
sqlbabel-tokenize = { git = "https://github.com/sqlstack-io/sqlbabel.git", rev = "b7b8acba57c0a81b173d328cf7e246a927a6dd93" }
sqlbabel-syntax-sqlserver = { git = "https://github.com/sqlstack-io/sqlbabel.git", rev = "b7b8acba57c0a81b173d328cf7e246a927a6dd93" }

[workspace.lints.rust]
unsafe_code = "forbid"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ skills:
check-rust:
cargo fmt --check
@# The Rules read trees only: no crate they reach may tokenize or parse SQL.
@if cargo tree -p sqlclean-rules -e normal --prefix none | grep -E '^sqlquack-(tokenize|parse|syntax-)'; then \
@if cargo tree -p sqlclean-rules -e normal --prefix none | grep -E '^sqlbabel-(tokenize|parse|syntax-)'; then \
echo "sqlclean-rules must not reach a tokenizer or parser" >&2; exit 1; fi
cargo clippy --all-targets --quiet -- -D warnings

Expand Down
9 changes: 7 additions & 2 deletions crates/sqlclean-cli/skill/references/docs/cli/check.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ and count characters, not bytes.
`fix` is `"safe"`, `"unsafe"` or `null` when the finding has no fix. `summary.fixable` counts
findings with a fix of either kind.

`held` lists the [Databricks statements left as written](../configuration.md#databricks-statements-left-as-written),
each with its `path`, `line` and `form`, and `summary.held` counts them. They never change the exit
code.

## SARIF output

`--output-format sarif` prints a SARIF 2.1.0 log for code-scanning tools. Every finding is a result
Expand All @@ -156,8 +160,9 @@ text:
}
```

The SARIF log lists findings only. Stale exceptions still make the command exit `1`; read them
from the text or JSON output. See [CI](../integrations.md#ci) for an upload example.
The SARIF log lists findings as results. Each Databricks statement left as written is a tool
execution notification with `level` `note` and its start line. Stale exceptions still make the
command exit `1`; read them from the text or JSON output. See [CI](../integrations.md#ci) for an upload example.

## Exit codes

Expand Down
4 changes: 3 additions & 1 deletion crates/sqlclean-cli/skill/references/docs/cli/fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ findings:
formatter cannot format is reported as `<path>: could not format: <reason>` and keeps its fixes.

A file that does not parse gets no fixes and is reported as
[`SQLCLEAN999`](../rules/overview.md#parse-errors-sqlclean999).
[`SQLCLEAN999`](../rules/overview.md#parse-errors-sqlclean999). Findings in
[Databricks statements left as written](../configuration.md#databricks-statements-left-as-written)
get no fixes either.

## Exit codes

Expand Down
Loading
Loading