sql-lint
sql-lint copied to clipboard
Semicolon in string breaks linter
If I have a ';' as part of a string, errors will be displayed when there is none.
For example, a file with the following contents: SELECT if (true, ";", 1) as test
throws the following error: [sql-lint: unmatched-parentheses] Unmatched parentheses.
Hey @JoshMayberry,
Thanks for the report, I'll look into this soon
Just as an update/personal ramble to myself, I think I know of an easy quick way to fix this.
Scan backwards from the end of the string and look for the first semicolon instead of doing what we do now.
I think the offending code is src/reader/reader.ts::37