Resharper to do the code analysis (Code developed in C# language)

300 Views Asked by At

I am new to sonarQube & Resharper. And I used the Resharper to do the code analysis (Code developed in C# language) because without built the project we can do the code analysis by using the Resharper. Now the Analysis running successfully (the resharper analysis)for the unittest project files not for the normal project file. If unittest project is missing in the sln file then the SonarQube throws an exception "No files to inspect were found." and the Analysis getting fails.

So my Question is how to run the code analysis(using Resharper in Sonar) to Normal project file sln file (with/without the unittest project in that sln file). Or commands to do the necessary changes in the Sonarqube input so that the Executing command will run the Resharper analysis to the all the project files.

  • Input to the SonarQube:

cd:\sonar-scanner-2.5\bin\sonar-runner.bat -e "-Dsonar.jdbc.url=jdbc:mysql://ip/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true" -Dsonar.host.url=http://ip/ "-Dsonar.projectBaseDir=cd:\workspace" -Dsonar.sourceEncoding=UTF-8 -Dsonar.sources=. -Dsonar.resharper.includeAllFiles=false -Dsonar.resharper.projectName=* -Dsonar.projectVersion=1.0 -Dsonar.projectKey=projectkey_cs "-Dsonar.resharper.solutionFile=cd:/workspace" -Dsonar.resharper.timeoutMinutes=30 -Dsonar.ndeps.mode=skip -Dsonar.gallio.mode=skip -Dsonar.projectName=projectName

Executing command: cd:/inspectcode.exe /output=cd:\resharper-report.xml /no-swea /project=* /profile=cd:.sonar\resharper-sonarqube.DotSettings /no-buildin-settings cd:\XXXX.sln

0

There are 0 best solutions below