Question

One of the most useful code analysis tools of Resharper is to mark symbols as not used if no usage if found in the solution.

Unfortunately any symbol that is covered by unit tests is regarded as used.

=> I am looking for a way to ignore the unit tests for this usage analysis.

Scanning through the Resharper options I found a button labeled "Edit Items to Skip". It has a long description text that says, amongst other things, "...if a certain symbol in solution is only used in files that you skip, this symbol will be highlighted as never used."

This sounded like exactly what I wanted. But by putting the unit test project on the skip-list not only reveals any effectively unused symbol, it only disables the whole code analysis for the test project. Of course I would still want to write good unit test code and thus make use of all the code analysis features of Resharper. I only do not want to count the usages of symbols outside the test project.

Any ideas?

Was it helpful?

Solution

Discovered a very simple answer:

Unload the test project and refresh the code analysis.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top