如果在线则获取 SonarLint 的远程配置文件,如果离线则使用本地

Getting remote config file for SonarLint if online, using local if offline

当前

我的公司目前正在使用 checkstyle 和 findbugs 脚本来衡量他们的代码质量。我是将这些设置迁移到新的 SonarQube 驱动环境中的人。

当我开始想知道是否可以查看 运行ning SonarQube 服务器的远程配置设置并相应地更新本地设置时,我想到了一个问题。

现在,checkstyle 和 findbugs 是这样的:

1) someone changes the config xml file and uploads it to the server
2) the same person informs via email, that he changed the file and all 
   others need to download it
3) The others download the changed file.

Person A  ---change---> settings.xml
                    ________|____________
                   |        |            |
 Person B <--------       Person C       ------->Person D

明显的问题:如果有人没有下载怎么办? => 合并注释爆炸...

我想要的

我想让SonarLint(SonarQube的本地实例运行ning在eclipse中)自动更新本地使用的配置文件,所以它总是符合远程 运行ning 服务器的配置。

但是: 如果我没有互联网连接或没有连接到服务器(例如,我无法访问公司网络),我仍然希望 SonarLint 运行 使用它从服务器获得的最新配置。像这样

我已经将 checkstyle 规则集成(或者至少我认为)到 SonarQube 服务器中,并让它们从 SonarCheck 继承。我也设置成默认了。

.                                     yes! --> download latest version and run
.                                    /
SonarLint ----do I have a connection?
.                                    \
.                                     no! --> run latest local config

除此之外我希望 Jenkins 服务器使用 SonarQube 服务器

问题

我对 SonarQube 和 SonarLint 完全陌生。我什至不知道 ifwhere SonarLint 的本地配置文件可能是...

这可能吗?如果是的话,你能帮帮我吗?

提前致谢!

SonarLint 从更新站点更新其规则和插件一次,然后可以 运行 脱机。 目前,您无法使用自己的规则配置文件和设置将其指向您自己的 SonarQube Server。此功能将很快添加到 v2.0

有几个SonarQube Scanners,包括一个Jenkins SonarQube plugin. These scanners can use your SonarQube Server, you just need to configure the analysis