简体   繁体   English

SonarQube + StyleCop插件(用于C#)

[英]SonarQube + StyleCop Plugin (for C#)

According to http://docs.sonarqube.org/pages/viewpage.action?pageId=1441942 We have to set the styleCop Path as 根据http://docs.sonarqube.org/pages/viewpage.action?pageId=1441942,我们必须将styleCop路径设置为

  Settings > General Settings > C# > StyleCop > Path to StyleCop.dll

If there a way, I can set the value of 如果有办法,我可以设置

 sonar.stylecop.styleCopDllPath

using command "MSBuild.SonarQube.Runner.exe begin" or any other means. 使用命令“ MSBuild.SonarQube.Runner.exe开始”或任何其他方式。

Default value is "C:/Program Files (x86)/StyleCop 4.7/StyleCop.dll" 默认值为“ C:/程序文件(x86)/ StyleCop 4.7 / StyleCop.dll”

I am using 32-bit wiindows 7, which does not have folder (Program Files (x86)). 我正在使用没有文件夹的32位wiindows 7(程序文件(x86))。

I am using 我在用

SonarQube 4.5.6 LTS SonarQube 4.5.6 LTS

C# Plugin version - 4.4 C#插件版本-4.4

StyleCop version - 1.1 StyleCop版本-1.1

Thanks 谢谢

I presume you are having problem setting the path for the styleCop. 我认为您在设置styleCop的路径时遇到问题。

You could try to use the environment variable %PROGRAMFILES% to get into your program files folder, regardless your operating system language. 您可以尝试使用环境变量%PROGRAMFILES%进入程序文件文件夹,无论使用哪种操作系统语言。

so, it would be something like that: %PROGRAMFILES%/StyleCop 4.7/StyleCop.dll 因此,它将类似于:%PROGRAMFILES%/ StyleCop 4.7 / StyleCop.dll

Just make sure you have this directory on your machine! 只要确保您的计算机上有此目录即可!

hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM