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

↘锁芯ラ 提交于 2019-12-30 07:23:06

问题


Current

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.

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.

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...

What I want

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.

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

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

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

The problem

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?

Thank you in advance!


回答1:


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.

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



来源:https://stackoverflow.com/questions/34092359/getting-remote-config-file-for-sonarlint-if-online-using-local-if-offline

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!