如果在线则获取SonarLint的远程配置文件,如果离线则获取本地的配置文件 [英] Getting remote config file for SonarLint if online, using local if offline

查看:335
本文介绍了如果在线则获取SonarLint的远程配置文件,如果离线则获取本地的配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

My company is currently using checkstyle and findbugs scripts to measure their code quality. I am the one to imigrate those settings into a new SonarQube driven environment.

我开始想知道是否可以查找正在运行的SonarQube服务器的远程配置设置,并相应地更新本地设置.

I came to a point when I started wondering, if it was possible, to look the remote config settings of the running SonarQube server up and update the local settings accordingly.

现在,使用checkstyle和findbugs就像这样:

Right now, with checkstyle and findbugs it is like this:

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

一个明显的问题:如果有人不下载怎么办? =>合并批注会爆炸...

The obvious problem: what if someone didn't download? => The merge annotations explode...

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

I want SonarLint (The local instance of SonarQube running in eclipse) to automatically update the locally used configuration file, so it is always in line with the config of the remotely running server.

但是: 如果我没有Internet连接或没有与服务器的连接(例如,我无法访问公司网络),我仍然希望SonarLint能够以服务器上的最新配置运行.像这样

BUT: if I do not have an internet connection or no connection to the server (e.g. I have no access to the companies network), I still want SonarLint to run with the latest configuration it had from the server. Something like this

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

I already integrated (or at least I think) the checkstyle rules into the SonarQube server and let them inherit from the SonarCheck. I also set it to default.

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

除此之外,我希望SonarQube服务器可以由Jenkins服务器使用

Beside that I want the SonarQube server to be used by a Jenkins server

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

I am totally new to SonarQube and SonarLint. I do not even know if and where a local config file for SonarLint could be...

这可能吗?如果是,请您能帮我吗?

Is this possible? If yes, can you help me, please?

提前谢谢!

推荐答案

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

SonarLint updates from the update site its rules and plugins once, and then can run offline. For the time being, you cannot point it to your own SonarQube Server with your own rules profile and settings. This feature will be added soon in the v2.0.

有几个SonarQube Scanners,包括 Jenkins SonarQube插件.这些扫描仪可以使用您的SonarQube Server,您只需配置分析

There are several SonarQube Scanners, including a Jenkins SonarQube plugin. These scanners can use your SonarQube Server, you just need to configure the analysis.

这篇关于如果在线则获取SonarLint的远程配置文件,如果离线则获取本地的配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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