How to disable Resharper per directory?

Hello,

Our code is organized like this:

Source/
    Project1/
    Project2/

ThirdParty/
    Other1/
    Other2/

Solutions under Source include projects from under ThirdParty.

Is it possible to disable Resharper analysis / warnings on everything under ThirdParty without changing every individual third-party project.
E.g., I added a single Settings.StyleCop file to ThirdParty and it applies recursively to all projects underneath.

I can't do it in "This Computer" option layer, since that configuration is not under source control and would have to be redone on every dev computer.

I'm running ReSharper 7.0, Visual Studio 2010 SP1.

Thank you,
Igor.

9 comments
Comment actions Permalink

Hello Igor
     You should be able to achieve this by adding 'ThirdParty' folder to the 'Items to Skip' list under ReSharper | Options | Code Inspection | Settings. Let me know if this helps. Thank you!

Andrey Serebryansky

Software Developer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

If I do that, where is this setting saved? How do I check it into source control?
Will someone getting the source from source control automatically get their ReSharper to recognize this setting?

0
Comment actions Permalink

Hello Igor
     That depends on how you save the change. If you add some folder using the 'Edit Items to Skip' button, you can click 'Save To' on the Options dialog and then choose some non-shared layer (such as solution-personal or This computer), so your change will not be shared with your team members. You can also choose the solution-shared layer, so the setting will be saved to <solution_name>.dotsettings file under your solution folder which you can then put into source control and share it with other team members. Let me know if this helps. Thank you!


Andrey Serebryansky

Software Developer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

As I mentioned in previous posts:

- "My Computer" layer doesn't work since it's not under source control
- "Solution" layer doesn't work since there are no solutions under ThirdParty, only under Source folder
- "Project" layer doesn't work since I don't want to do this per project, but rather once per ThirdParty directory

Is there anything else I missed?

0
Comment actions Permalink

If there is nothing else I try, can you please officially confirm that what I'm trying to do is not possibe?

Thanks,
Igor.

0
Comment actions Permalink

Hello Igor
     Sorry for delayed response! The fact that Third Party files are not located under Source folder (where all your solutions are located) should not prevent you from saving the modified list of skipped folders to Solution team-shared layer. Have you tried modifying the 'Edit Items to Skip' list and saving the result to Solution team-shared layer? Thank you!

Andrey Serebryansky

Software Developer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

I agree. However, that would make it necessary to repeat the same config in every solution under Source.

As I mentioned in the original post: is it possible to do it similarly to StyleCop, where I can just add 1 file at the top of ThirdParty folder?

Thanks.

0
Comment actions Permalink

Hello Igor
     Yes, you'll need to perform this operation for each solution. There's no similar behavior to StyleCop, but you can add a separate file-based layer that is stored in your version control, attach it under This Computer and save this setting to that layer, so that this setting will be applied to all solutions you open on your machine. Thank you!

Andrey Serebryansky

Software Developer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

0
Comment actions Permalink

That's a good idea, but unfortunately this doesn't work for 2 reasons:

1. ReSharper is not allowing me to add a directory to the skip list that's outside the solution directory.
As I mentioned, my solution is under Source, while the directory I want to skip is under ThirdParty (which is a sibling of Source).

2. Even if I configure a directory to skip from within the solution location, it's still local to the solution,
even though I saved this new layer in a file directly under Source.

Regards,
Igor.

0

Please sign in to leave a comment.