Project scopes without non-project files

Under Scopes, I've excluded project directories like errors/logs. When I use Find in Path and select my saved scope, I get tons of results from non-project directories, which I can't exclude under the Scopes setting for some reason. Alternatively, if I only search in my project folder, I of course get tons of results of various cached/config'ed/logged files. It makes looking for keywords in files extremely frustrating.
I need to set a scope to only search within my project *and* exclude those needless project subfolders. Where can I set that up? Thanks.

1
10 comments

Could you please share some screenshots with find results examples and how your "exclusion" scope is set?

0

Assuming that unneeded directories contain only caches/logs and no codebase at all, you may mark these as excluded (via right-click > Mark as > Excluded).

These will be excluded from indexing and therefore, search as well.

0

Hi team,

I'm having the same problem, which seems to be new in phpstorm 2019.* because it didn't used to happen...

My project root is /home/mykel/project_name/ 

Under that directory I have manually excluded documentation and cache directories from the Settings screen

Also under that directory I have several symlink directories which I can also exclude, but also several symlink files which cannot be excluded (pet peeve).

So I have set up a custom Scope from where I can nominate specific files to exclude, being those symlink files.

Now my trouble is that the custom Scope is returning results from /home/mykel/Phpstorm/plugins/JavaScriptLanguage/ and other such directories, not even inside the project...

Any ideas why? Or how to fix it?

Example of my scope:

!file[project_name]:.idea//* &&
!file[project_name]:automated_testing//* &&
!file[project_name]:conf//* &&
!file[project_name]:internal_scripts//* &&
!file[project_name]:trunk/path/to/symlink/file.php &&
!file[project_name]:trunk/path/to/symlink_directory//*

1
Avatar
Permanently deleted user

Same problem here, results from jar files under plugins directory are included in scope search. Tried adding !file:/home/tauno/PhpStorm/plugins//* at the beginning of the scope pattern but it did not help.

0

Are you both on 2019.2.2?

Tried the same pattern for scopes but it worked alright for me.

Could you please attach screenshots that would help to reproduce the problem? Here's an example:

0

Hi Dmitry,

Yes I'm on 2019.2.2

Here's a screenshot of the scope setup:

Here's the full contents of the scope:

!file[newbook]:.idea//*&&
!file[newbook]:automated_testing//*&&
!file[newbook]:conf//*&&
!file[newbook]:trunk/common/html/actions/reports/user_statistics.htm&&
!file[newbook]:trunk/api/htdocs/images//&&
!file[newbook]:trunk/api/htdocs/images/js/*.min.js

 

and here's the search results:

the path there shown on the results is outside of the project directory, which is /home/mykel.scappin@au.newbook.cloud/newbook/

FYI i tried invalidating caches & restarting, but it didn't help.

0

I have exactly the same problem with Webstorm. Shall I file a separate ticket instead of adding my 2 cents here?

0
Avatar
Permanently deleted user

I am having the same issue with WebStorm 2019.3.1. Is there any solution to this problem yet?

0

Unfortunately, no, there's no solution yet. Please vote if anyone hasn't voted yet: https://youtrack.jetbrains.com/issue/IDEA-103560

0

I would desperately need this function. It is insane if I have only <10 occurrences of a string in my project but the C:\Program Files\PhpStorm\plugins\php\lib\php.jar!\stubs\pgsql\pgsql.php contains hundreds of them so it is listed hundreds of times. Please, add this feature.(Yes, I voted for the bug as well.)

0

Please sign in to leave a comment.