从声纳运行器迁移到MSBuild Runner. sonar-project.properties文件在哪里? [英] Migrating from sonar-runner to MSBuild Runner. Where did the sonar-project.properties file go?

查看:387
本文介绍了从声纳运行器迁移到MSBuild Runner. sonar-project.properties文件在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

场景: 我正在将当前的VS解决方案分析设置从使用声纳运行器迁移到使用MSBuild运行器.但是,我遇到了一个相当重要的问题.

Scenario: I am migrating our current VS Solution analysis setup from using the sonar-runner to using the MSBuild runner. However I am encountering a fairly significant problem.

在旧设置中,我们使用sonar-project.properties文件指定了项目名称,键,最重要的是一长串跳过的项目(sonar.visualstudio.skippedProjectPattern).

In the old setup, we specified our project name, key and most importantly a long list of skipped projects (sonar.visualstudio.skippedProjectPattern) using the sonar-project.properties file.

这是因为[警告:丑陋的传统不良编码实践警报]我们有六个解决方案,这些解决方案使用同一个git repo构建了数十个项目.许多项目在多个解决方案中是通用的,我们不希望对它们进行多次分析.因此,每个解决方案都有拥有"的一组项目,这些项目将作为其中的一部分进行分析.因此,每个其他解决方案的sonar-project.properies文件都指定要忽略这些项目.

This is because [WARNING: ugly legacy bad coding practice alert] we have six solutions that build dozens and dozens of projects, all out of the same git repo. A lot of the projects are common across several solutions and we don't want them analyzed more than once. So each solution has a set of projects that it "owns" and which are analyzed as part of it. Thus the sonar-project.properies file for each of the other solutions specifies that these projects are to be ignored.

问题:在新的MSBuild Runner方法中,除MS解决方案级别(也称为SonarQube Project级别)之外,似乎没有配置文件或机制在命令行上将参数传递给MSBuild运行器的开始"阶段.一个拥有全局配置文件,或者拥有MSBuild *.*proj文件(即, MS项目级别配置文件).后者显然是不可能的,因为是否要从分析中排除项目是基于要分析的解决方案.

The Problem: In the new MSBuild Runner approach, there does not appear to be MS solution level (also read as SonarQube Project level) configuration file or mechanism aside from passing arguments on the command line to the MSBuild runner's 'begin' phase. One either has the global configuration file, or the MSBuild *.*proj files, (that is, MS project level configuration files). This latter is clearly out of the question as whether a project gets excluded from analysis is based on which solution is being analyzed.

如前所述,可以想象我们可以在命令行中传递所有这些信息,但这是次优的.我们的构建是通过尽可能通用的脚本完成的.将配置保存在sonar-project.properities文件中对保持它们的状态有很大帮助,我们希望这里丢失了一些东西,这些东西会让我们继续使用该文件或类似文件.是吗

As noted, conceivably we could pass all this in on the command line but that is sub optimal. Our builds are done by scripts that are, to the extent possible, generic. Having the configuration in the sonar-project.properities file was a big help in keeping them that way and we are hoping we are missing something here that will let us keep using that file or a similar one. Are we?

推荐答案

当前没有与MSBuild SonarQube Runner 1.0版中的sonar-project.properties文件等效的文件.我已经在项目的待办事项列表中添加了新票证,以考虑在即将发布的版本中添加此功能: http://jira.sonarsource.com/browse/SONARMSBRU-124

There currently is no equivalent to the sonar-project.properties file in the MSBuild SonarQube Runner version 1.0. I've added a new ticket to the project's backlog to consider adding this feature in an upcoming release: http://jira.sonarsource.com/browse/SONARMSBRU-124

这篇关于从声纳运行器迁移到MSBuild Runner. sonar-project.properties文件在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆