Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/268.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在Sonar中运行Stylecop时,我如何让它分析识别为测试项目的项目?_C#_Testing_Sonarqube_Stylecop - Fatal编程技术网

C# 在Sonar中运行Stylecop时,我如何让它分析识别为测试项目的项目?

C# 在Sonar中运行Stylecop时,我如何让它分析识别为测试项目的项目?,c#,testing,sonarqube,stylecop,C#,Testing,Sonarqube,Stylecop,好的,让我们假设我想要按照规则生活,像对待生产代码一样仔细地对待测试代码。如何让Sonar和Stylecop分析我的测试项目 我基本上已经在sonar-project.properties文件中写下了这一点: #Core C# Settings sonar.dotnet.visualstudio.solution.file=SomeSolution.sln sonar.dotnet.excludeGeneratedCode=true sonar.dotnet.version=4.0 sona

好的,让我们假设我想要按照规则生活,像对待生产代码一样仔细地对待测试代码。如何让Sonar和Stylecop分析我的测试项目

我基本上已经在sonar-project.properties文件中写下了这一点:

#Core C# Settings 
sonar.dotnet.visualstudio.solution.file=SomeSolution.sln 
sonar.dotnet.excludeGeneratedCode=true
sonar.dotnet.version=4.0
sonar.donet.visualstudio.testProjectPattern=*.Tests

#StyleCop
sonar.stylecop.mode=
阅读sonar构建日志,我看到除了测试(即SomeTestProject.tests)项目之外的所有项目都由Stylecop分析


如何让sonar+stylecop也分析我的测试项目?

似乎sonar 3.3+C插件2.0不支持这一点。将在2.1中固定