Closed radoslawch closed 2 years ago
I also have issues due to this.
Here's the official MariaDB docs on commenting: MariaDB comment syntax
Could we have some VSCode settings or more defaults to fix this? Such as this:
"inlineSQL.lintSQLCommentLine": [
"`--sql",
"`-- sql",
"\"--sql",
"\"\"\"--sql",
],
Right now we have:
Linting and diagnostics powered entirely by awesome joereynolds/sql-lint and works for multiline strings that start with either `--sql (backtick followed by --sql), "--sql or """--sql.
Obviously, we lack the `-- sql.
Fixed in v2.13.0. Syntax highlighting and diagnostics should work for queries starting with --\s*sql
regex.
Assuming Ruby (on Rails, with ActiveRecord) and MySQL/MariaDB - these databases require a space after "--" in a comment.
Example
Current behaviour
In queryA: SQL is not highlighted.
In queryB: SQL is highlighted but it's not valid MySQL/MariaDB query.
Expected behaviour
Both queries should have highlighted SQL.