Excluding certain files from inspection (Symfony2)

PhpStorm V8.0.3 Build #Ps-139.1226 1/30/2015

I am working on a project with Symfony2.
I have inspections enabled for the app/ directory.
Symfony generates a lot of cache files and one of these (bootstrap.php.cache) lands in the app/ directory.
PhpStorm generates numerous errors on the this file.
This causes it to flagged with a red, wavy underline and the app and top-level directories are flagged as well.

Whild not a show-stopper, it is annoying. I have come to rely on PhpStorm's highlighting to give me a valid heads up for errors and I find myself waisting time checking those directories when nothing is wrong.

So, to the question: Is there any way to prevent PhpStorm from inspecting individual files?

Thanks

1 comment
Comment actions Permalink

Hi there,

You can mark whole folder as Excluded (via context menu or "Settings | Project | Directories") -- this will prevent those files from being indexed.

For specific file (all inspections) -- use Inspector guy icon in status bar (or the same via "Code | Configure Current File Analysis...").

To disable specific inspections:

  • Create custom scope (Settings | Appearance & Behaviour | Scopes) that will include only desired files/folders
  • Settings | Editor | Inspections -- find that inspection (or whole group) and create separate rule for that scope.
0

Please sign in to leave a comment.