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

查看:22
本文介绍了在线获取 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 的本地实例)自动更新本地使用的配置文件,所以它总是与远程运行服务器的配置一致.

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

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

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

我对 SonarQube 和 SonarLint 完全陌生.我什至不知道 ifwhere 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 扫描仪,包括 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天全站免登陆