Excluding RVM files from search scopes

148 views Asked by At

When performing a search of an entire Rails app I use a custom scope to exclude results from areas I don't care about. Like the log files, vendor plugins and etc. This has worked well except ever since RVM support was added my searches now include all files in every gem installed. This often produces massive amounts of results to searches when only a few hits are actually in my project code.

I've had trouble coming up with a rule that will exclude the gems in my .rvm directory.

I've tried tons of variations of exclusion rules like the following:

&&!file[CORE]:*/.rvm//*  
&&!file[CORE]:~/.rvm//*

I'm suspicious the problem may have to do with these files existing outside of the project but the exclusion rules all seem to focus on files within the root of the project.

1

There are 1 answers

0
ferbs On

I had a similar problem after upgrading to RubyMine 7.

The presence of this argument in the scope resulted in unwanted .rvm matches:

file:lib//*

Restricting the pattern by project name (using their new syntax) fixed the problem:

file[myproj]:lib//*