Repo:
- Click "Extensions -> CodeRush -> Options"
- Click "Editor -> C# -> Code Analysis -> Code Issues Catalog"
- Click on "Search" and type "unused"
- Make sure all rules have checkboxes checked for "Enabled" and "Register in VS"
- Click Apply and then OK
- Create a C# internal class with an unused member
- Open the VS Error window
EXPECTED: A message to that a unused type can be removed.
ACTUAL: Nothing
BTW: I've never seen this feature work.
Dan,
There can be two root causes for this behavior:
Let me know if this helps.
"Build + Intellisense" is selected.
I've unchecked "Run code analysis in separate process"
I'm now seeing some CodeRush issues reported, but it still doesn't show me any unused member issues for the following code:
internal class NotUsedClass { private int NotUsedProperty { get; set; } }
Finally, I don't understand why "Run code analysis in separate process" needs to be unchecked. Why can't it run out of process like every other Roslyn analyzer?
Dan,
I reproduced the missing Unused Member diagnostics in the Error List. I will investigate it and let you know my results.
Regarding the "Run code analysis in separate process" setting, the MEF composition does not work in a separate process. We would need to manually work around this limitation (and few others), which simply does not exist when code is analyzed in the same process. This task is complex, resource consuming, and has a simple workaround. So, we do not plan to work on it.
If you need to run code analysis in a separate process, just use the Code Issues tool window supplied by CodeRush instead of the built in Error List.