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?
Discovered a very simple answer:
Unload the test project and refresh the code analysis.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With