Currently I'm having a challenge with code inspections I hope someone here can help me with. I am using a home grown php parser to take a php file, make some modifications, and save the newly modified file in a tmp directory. When my code runs it auto loades from the tmp directory using the same class and namespace names. Unfortunatley this makes PHPStorm think there is a problem with the namespaces in my normal code.
I've done some searching around and found two methods people have used to "exclude" files in their poject.
- Use "mark as Excluded"
- Use scopes
- Exclude and then include the folder as an external lib
The problem with Excluding a folder is that the folder disappears from the project entirely. I am unable to view it without going into my project settings. This is problematic when I want to quickly look how my "compiled" classes are doing, or when I want to look through the code to debug any issues. Excluding works great for fixing the namespace error, but isn't a viable solution since I can't easily view my generated files.
With scopes, I'm able to create a different "view" of the temp files, and even modify the inspections on them, but I see no way to tell phpstorm to just ignore those files. I still get the namespace errors.
Option 3 seems like it may work, but once I include the folder the errors pop back up again.
So, I'm at a loss. Is there any way to tell phpstorm to ignore / exclude a folder but still make it (and its files) easily accessible?
Thanks for any help you can provide!