Resharper (Find and) fix all issues at once

C#Visual StudioVisual Studio-2010Resharper

C# Problem Overview


e.g. alt enter -> context menu -> Find all 'Redundant name qualifier' issues -> but now in the new window that lists all those issues in my project, is there a way to fix them all ? (rather than go through them individualy)

ta.

C# Solutions


Solution 1 - C#

For now, you have to go through the issues individually. There's an existing request to batch-apply fixes to all similar issues selected in the "Inspection Results" tool window.

Code Cleanup does batch-remove certain issues in any given scope but it's quite limited in the number of fixes it can apply, compared to the number of code issues that ReSharper is able to detect.

Solution 2 - C#

Click into a redundant qualifier, alt+enter, then choose from the context menu that lets you fix the issue however thoroughly you'd like.

Resharper options to remove redundant qualifier

I'm running ReSharper 8.2.

enter image description here

Solution 3 - C#

Yes, you can use ReSharper's "Cleanup Code" to remove redundant qualifiers (amongst other things). This is available from the context-menu when you right-click files, projects and folders in the Solution Explorer window. Code Cleanup will run over all the selected files, reformatting and fixing common issues - it is also customizable.

Solution 4 - C#

This is available (in part) in the latest build. If you go to a specific issue in the code editor, click the lightbulb the fix option now has a submenu for some issues that can be applied to the entire solution. Would be cooler if it was available from the Code Issues window, but still a great improvement.

New Fix in Scope Options https://www.jetbrains.com/help/resharper/2016.1/Code_Analysis__Fix_in_Scope.html

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionCelView Question on Stackoverflow
Solution 1 - C#Jura GorohovskyView Answer on Stackoverflow
Solution 2 - C#Jon CrowellView Answer on Stackoverflow
Solution 3 - C#Tim LloydView Answer on Stackoverflow
Solution 4 - C#James WhiteView Answer on Stackoverflow