-
Notifications
You must be signed in to change notification settings - Fork 55
[Bug]: False positive for ST11 #2513
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
I try to use sqruff fix on this query
SELECT
"t"."a",
"t2"."b"
FROM "my_table" AS "t"
LEFT OUTER JOIN "my_table2" AS "t2" ON "t2"."a" = "t"."a";I get this output:
$ sqruff fix test.sql
== [test.sql] FAIL
L: 5 | P: 19 | ST11 | Joined table '"my_table2" AS "t2"' not referenced
| elsewhere in query.
| [structure.unused_join]
The linter processed 1 file(s).
All Finished 📜 🎉
It seems that the alias of the LEFT OUTER JOIN table my_table2 is not well considered. Note that with an inner join, there is no problem.
Version
I am using sqruff 0.37.3
Checked in Playground
- I have checked this bug in the playground.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working