Exclude Directory from inspection

Can i mark a directory which includes "skeleton files" from the inspection?

The skeleton directory includes several files and directories, which aren't valid php files, they're only templates

class  {{ classname }} extends BaseController


Because of the invalid code, the files and the parent directories are underwaved. Because ALL parent directories are underwaved, it's really hard to see in the project window, if there's really a invalid code, or if it's only because of the skeleton files.


There is no such thing in PhpStorm as exclude some folder from indexing/inspections only. You can disable all inspections for custom scope (like it is described here: http://devnet.jetbrains.net/message/5465511 ), but it's quite inconvenient to do and I do not think that it will do 100% as you would like.

Few options:

  • Exclude such folder from project completely (Settings | Directories)
  • Mark individual files as plan text (right click in Project View | Mark as Plain text)
  • Disable all inspections for individual file (click on Inspector guy in status bar and see there)
  • Give those files separate extension (e.g. filename.php.tpl) .. and then assign that pattern (e.g. *.php.tpl) to Text file type in Settings | File Types

The last one is the best in my opinion -- if I would do anything like that I would definitely go this way (if I can, of course).


thx very much

I've excluded the directory, but then i would need to switch the directory status ( include,exclude) all the time when i would need to create a new skeleton file or edit a existing one, that's why I agree, that the last option would be probably the best.


Please sign in to leave a comment.