Reporter | Werner Strydom (bloudraak) |
---|---|
Created | Jan 30, 2012 12:41:07 AM |
Updated | Jan 30, 2012 12:41:07 AM |
Priority | Normal |
Type | Feature |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Evgeny Pasynkov (pasynkov) |
Subsystem | Code Analysis |
Affected versions | 6.1 |
Fixed in build | No Fixed in build |
Consider the following:
MyClass is not used anywhere in my solution and is not marked as a public API. However, because I wrote tests for it, ReSharper considers it to be used. I'd like ReSharper to provide some exclusions when it looks for dead code.
Here are some examples:
For very large projects, this may save hours if not days of time finding dead code.
// In MyProject public class MyClass { /* ... */ } // In MyProject.Tests [TestClass] public class MyClassTests { [TestMethod] public void FooTest() { var target = new MyClass(); } }
MyClass is not used anywhere in my solution and is not marked as a public API. However, because I wrote tests for it, ReSharper considers it to be used. I'd like ReSharper to provide some exclusions when it looks for dead code.
Here are some examples:
- Ignore projects with names matching some regex. This will allow me to state that to ignore test assemblies
- Ignore methods with names matching some regex. This will enable me to ignore Dispose, Equals and HashCode methods and find fields that are not used otherwise.
For very large projects, this may save hours if not days of time finding dead code.