2 Replies Last post: Feb 1, 2013 12:31 AM by Fabio Chelly  
Fabio Chelly Newbie 19 posts since
Jul 20, 2012
Currently Being Moderated

Jan 30, 2013 2:04 AM

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?

 

Thanks,

Fabio

 

screenshot.png

Andriy Bazanov Master 4,159 posts since
May 28, 2010
Currently Being Moderated
Jan 30, 2013 5:31 AM in response to: Fabio Chelly
Re: SQL inspections shows a lot of false-positive errors in PHPStorm 6

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

More Like This

  • Retrieving data ...