How to setup PHPStorm so it skips inspections in defined directories

How to setup PHPStorm so it skips inspections in defined directories? Doctrine proxies produce a lot of noise before commits. There are autogenerated so we do not have any means to change them and therefore want them to be skipped.

Comment actions Permalink

The way I had PHPStorm exclude directories for inspection is like this.

  • In the Project View
  • Right click on a folder
  • Mark Directory As
  • Excluded
  • Confirm button on next pop-up dialog box

Seems like that's what you want if I read your question correctly.

If you want to "get those back" you can go to:

  • PHPStorm -> Preferences
  • Project Settings
  • Directories
  • Look at the "Excluded Folders" list and click <X> on the ones to return.


Comment actions Permalink

Hi Oleg,

Try this:

  1. Define custom Scope (Settings | Scope) so it includes (or excludes) only files where inspection should run (or should not).
  2. Settings | Inspections
  • Find inspection in question, right click on it and choose "Add Scope"
  • Select desired custom scope
  • Now you can configure this inspection for desired scope and for everything else (outside of scope / default)
Comment actions Permalink

Andriy, thanks for the reply, I set up one scope in my project, but when I went  to Settings - Inspections - PHP - any inspection and clicked on it, there were only color related options (differerent colors for different levels of severity) there.

Comment actions Permalink

What version do you use? I'm on v4 EAP build and it is there. Quite possible that it is not available in v3.

Comment actions Permalink

PHPStorm 3.03, probably your suggestion works on 4.0 EAP builds.


Please sign in to leave a comment.