SonarLint Vs Resharper

Hello Everyone, recently i have been asked to compare SonarLint Vs resharper for code analysis. In my findings below are some observations
1- Resharper is paid library and include cost impact.
2- Sonarlint is better in case you are using SonarQube or sonarcloud for server for end to end analysis of large projects.
3- Resharper works very well for refactoring suggesstions however SonarLint have low coverage of refactoring issues.
4- ReSharper provides real time code analysis suggesstions however SonarLint analyzes the code after build.

Can you please help me to understand your thoughts for choosing the tool and provide some view to convince my team for using SonarLint over ReSharper.

FYI- We are using visual studio 2022 and SonarQube

Hi Arun,

Thank you for reaching out!

First, I would disagree with your assessment that “ReSharper provides real time code analysis suggesstions however SonarLint analyzes the code after build”. This is only true for a subset of our rules (the taint analysis, mainly). Most rules run in the IDE just like any other Roslyn analyzer. They raise issues as you type.

Second, as you mentioned, if you use SonarQube, you would lose a big part of the solution by not using SonarLint since it brings the result of the full code analysis (including taint analysis if you are on a paid edition) right in your IDE. And it is indeed free. Plus you get the benefit of things like “Open in IDE” from the issue in SonarQube, which can be a time saver.

On your third point, I cannot disagree that, today, we have fewer automatic fixes for our issues. However, given the other points and the fact that we keep improving SonarLint on that front, I would still put SonarLint on top.

Denis

2 Likes

Thank you, Denis, for your response. this is helpful.