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

时间:2015-12-04 15:59:43

标签: jenkins sonarqube checkstyle sonar-runner sonarlint

电流

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

当我开始想知道,如果可能的话,我想到了正在运行的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

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

我想要什么

我希望SonarLint(在eclipse中运行的SonarQube的本地实例)自动更新本地使用的配置文件,因此它始终与远程运行的服务器的配置一致。

BUT: 如果我没有互联网连接或没有连接到服务器(例如我无法访问公司网络),我仍然希望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完全不熟悉。我甚至不知道 if where SonarLint的本地配置文件可能是......

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

提前谢谢!

1 个答案:

答案 0 :(得分:3)

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

中添加此功能

有几个SonarQube Scanners,包括Jenkins SonarQube plugin。这些扫描程序可以使用您的SonarQube Server,您只需要configure the analysis

相关问题