I have a project in PHPStorm, which contains a few libraries (Zend, Doctrine, ...) grouped under a library
folder.
When running the code inspection, I <
If you need to completely exclude few files from any analyse (for example a compiled php file) like it not even exist, you can right click on file in source tree and select "Mark as Plain Text". This action totally remove any inspections on this file. With this I removed a lot of notifications about "source duplications" in Laravel 5.
If you need to activate it again - once more right click and "Mark as PHP".
This works nice for a few files. If you need to exclude whole directory with everything inside, use directory marking from settings or right click on directory and "Mark Directory As -> Excluded".
If you just need to disable inspections on one or two files, you can disable it at the file level easily:
(Using PHPStorm 8.0.2)
If you want to totally exclude a file or folder from completion and code help:
Right click the folder or file in your file browser (left handed) choose "Mark"-> "excluded"
That's what I wanted, I add that answer here because I found this question in Google when looking for an answer.
There is alternative solution. You can add «read-only» libraries to Include path
in Settings » PHP
section.
It is not the same with php.ini include_path
option, just referencing to some dirs as external, outside of your control. Exactly what you need.
As result
Please refer to the Scopes feature. You can define a custom scope for just your code, without the library folder, then run inspections on this scope only.
In the Inspections settings it's also possible to add the scopes and enable/disable each inspection per scope.