SQL inspections shows a lot of false-positive errors in PHPStorm 6

The latest version of PHPStorm allows me to activate SQL Inspections.
The problem is that a lot of SQL strings are dynamically created with PHP variables or by concatenate different SQL lines (see attached picture).

In consequence, a lot of files are underlined in red even if they don't contain any error at all.
I can disable SQL inspections by setting SQL dialect to "keywords only" but then I will also lose autocomplete and other useful stuff.

Is there a way to turn SQL errors into simple warnings?




Hi Fabio,

Try Alt+Enter on error, see which inspection is that, right arrow (to see submenu for that menu entry) and choose "Edit inspection..." -- you should be able to either disable that inspection .. or lower it's priority.

I'm not 100% sure, but I think that inspection will be "Settings | Inspections | SQL | Unresolved reference".

On related note: http://youtrack.jetbrains.com/issue/WI-2450


Thanks for your answer.
Apparently, there is no specifi inspection for those errors. So it seems impossible to disable them.


Similar call for help in PyCharm at https://intellij-support.jetbrains.com/hc/en-us/requests/622423


Some of the exotic, barely-googlable error messages I've seen with this problem:


<comma join expression> expected, unexpected end of file

'(', <reference>, GROUP, HAVING, UNION, WHERE or '{' expected, got '{'

'(', <reference>, or '{' expected, got '}'


Please sign in to leave a comment.