Search code examples
phpstormjetbrains-ide

PhpStorm. Highlight file in project tree on inspection error (e.g. Strict type checking rules violation)


Is it possible to highlight a file in the project tree on inspection error (e.g. Strict type checking rules violation) in PhpStorm?

I would like to highlight it as a serious error. Couldn't find anything in settings and documentation.

enter image description here

Now it just highlighted the wrong property and mark the line on the right. venter image description here


Solution

  • I thought it would be possible by changing the Inspection Severity to the highest Error level (see the official doc page on how to configure Inspection Severity)... but apparently this will not work.

    It seems that right now only certain hardcoded error types (that come from lower level Lexer/Parser as I understand) can display the "red underwave" in the Project View panel.

    Watch the following ticket: PhpStorm's WI-33552 --> platform-wide IDEA-96288 (star/vote/comment) to get notified with any progress.

    It's not the same of course, but will give yo an overview on a most-important errors (for your filtering level/inspection profile).


    As a possible alternative: Run Inspect Code manually (Code | Inspect Code from the Main Menu; you can invoke it for a specific folder/custom scope to limit the number of files to be processed) and then filter you results in the Problems toolwindow to only see the errors with required severity.