Sonar scanner with Resharper xml report

Hi, currently new to SonarQube.
What I’m trying to do is to make SonarQube to show Resharper analyzed issues.
I know that it was done with SonarQube Resharper plugin and quality gates but since it was removed and SonarQube already could import any roslyn analyzed report I thought that it would only need to add resharper generated .xml file when running SonarScanner on TeamCity. Everything seems to be okay but the Resharper report could not be visible in SonarQube project. And it’s even says that analyzation is completed correctly.
One more thing to mention, that I’m using bitnami Comunity edition version of sonarQube and I dont have Quality profile to accept Resharper issues. Is this could be the case that I need manually install some version of SonarQube Resharper plugin??
Also to import xml report I’m using parameters:
/d:sonar.resharper.cs.reportPath=%path%
/d:sonar.resharper.solutionFile=%path%
Thanks in advance.

Hi,

Welcome to the community!

I’m not aware of any parameters to import a Resharper report. The docs say this:

Issues from third-party Roslyn analyzers (including Roslyn analyzers provided by Microsoft) are included in the MSBuild output and imported by default into SonarQube so no properties exist to enable that behavior.

But I believe the Roslyn analyzers need to run during the build for their issues to be picked up by analysis.

 
HTH,
Ann

@Julius Resharper rules are not implemented as Roslyn analyzers, so the issues won’t be imported by default.

You would either need to install a third-party plugin that adds Resharper support, or convert the Resharper report file to the Sonar Generic Issue Import Format that the scanner can handle.

1 Like

Thanks for the answer

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.