C# project in sonarqube

匿名 (未验证) 提交于 2019-12-03 01:25:01

问题:

When I run sonar-runner for an analysis my simple C# project the analysis terminate on error on SonarLint.Runner.exe of permission denied:

ERROR: Error during SonarQube Scanner execution ERROR: java.io.IOException: Cannot run program "/opt/sonarqube-5.4/projects/ArturiCSharpSort/.sonar/SonarLint.Runner/SonarLint.Runner.exe": error=13, Permission denied ERROR: Caused by: Cannot run program "/opt/sonarqube-5.4/projects/ArturiCSharpSort/.sonar/SonarLint.Runner/SonarLint.Runner.exe": error=13, Permission denied ERROR: Caused by: error=13, Permission denied 

Effectively

-rw-r--r-- 1 root root 19456 Apr  5 11:14 .sonar/Lint.Runner/SonarLint.Runner.exe 

This following is my sonar-project.properties:

# Root project information  sonar.projectKey=ArturiCSharpSort  sonar.projectName=ArturiCSharpSort  sonar.projectVersion=1.0  # Some properties that will be inherited by the modules  sonar.sources=.  #List of the module identifiers  #sonar.modules=  # Properties can obviously be overriden for  # each module - just prefix them with the module ID  #module1.sonar.projectName=  #module2.sonar.projectName= 

I try to act a chmod on SonarLint.Runner.exe but it is rebuil at every analysis. How can I run analysis on C# project?

回答1:

Analysis of C# projects must be done on a Windows environment. Here it's failing because the project is analysed on Linux.

The thing is that SonarQube C# Plugin really is targeted to the Windows .NET ecosystem, which is where you'd anyhow build/maintain .NET projects. It must be used with the SonarQube Scanner for MSBuild, which requires MSBuild 14.0.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!