-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
With .sqruff:
[sqruff]
rules = allAnd min.sql:
WITH a AS (SELECT 1 AS x),
b AS (SELECT 1 AS y)
INSERT INTO t2 (z)
SELECT 1
FROM (SELECT ROW_NUMBER() OVER () AS rn FROM a) AS x
INNER JOIN (SELECT ROW_NUMBER() OVER () AS rn FROM b) AS y
ON x.rn = y.rn;Linting panics:
$ sqruff lint min.sql
thread 'main' panicked at crates/lib/src/rules/structure/st05.rs:224:52:
index out of bounds: the len is 0 but the index is 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
== [min.sql] FAIL
L: 1 | P: 1 | ???? | Unexpected exception. Could you open an issue at
| https://github.com/quarylabs/sqruff
The linter processed 1 file(s).
All Finished 📜 🎉
Version
v0.29.3
Checked in Playground
- I have checked this bug in the playground.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working