Closed mongeron closed 3 weeks ago
Can you share the entire query please?
Thanks!
Since a case wasn't shared, I'll just add my own here since I am running into the same issue and explain my case.
I am trying to lint migration files. A basic migration file looks like so (deploy/migrations/deploy/foo.sql).
-- Deploy proj:foo to mysql
BEGIN;
-- XXX Add DDLs here.
COMMIT;
This empty migration works and It doesn't really matter what is in this file (I have more complex migrations), sql-lint complains with with ticket's title.
>$ sql-lint deploy/migrations/deploy/foo.sql
sql-lint was unable to lint the following query "COMMIT;".This could be a bug with sql-lint. Visit this URL to create a bug report: https://github.com/joereynolds/sql-lint/issues/new?title=Unable%20to%20lint%20query&body=COMMIT;
I hope that helps.
Hello!
This has been fixed https://github.com/joereynolds/sql-lint/commit/d8d77cfbdab630dd427b4a931d13b0dcd42d4079
It's not been published via NPM yet though.
Thanks and sorry for the very long delay!
SQL Lint recognized
START TRANSACTION
statement properly.However,
COMMIT
statement to finish the transaction is not recognized.