Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-288062: Improve dead code detection

$
0
0
Reporter Werner Strydom (bloudraak) Werner Strydom (bloudraak)
Created Jan 30, 2012 12:41:07 AM
Updated Apr 3, 2012 5:35:32 PM
Priority Normal
Type Feature
Fix versions Mirabile Futurum
State Open
Assignee Evgeny Pasynkov (pasynkov)
Subsystem Code Analysis
Affected versions 6.1
Fixed in build No Fixed in build
Consider the following:

// 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:
  1. Ignore projects with names matching some regex. This will allow me to state that to ignore test assemblies
  2. 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.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>