SonarLint for Eclipse:配置一个自定义SonarQube&语言档案? [英] SonarLint for Eclipse : Configure a custom SonarQube & language profile?

查看:783
本文介绍了SonarLint for Eclipse:配置一个自定义SonarQube&语言档案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前, SonarLint for Eclipse 使用 https://update.sonarlint.org/ 作为SonarQube实例。

Currently SonarLint for Eclipse uses https://update.sonarlint.org/ as SonarQube instance.

有没有办法配置自定义SonarQube URL(使用用户身份验证)使用您自己的默认语言配置文件?

Is there a way to configure a custom SonarQube url (with user authentication) for using your own default language profile ?

当您需要更多规则或配置了一些排除(主要用于外部JavaScript库)时,可能非常有用像JQuery,...)

Could be very useful when you want more rules or you have configured some exclusions (mainly for external JavaScript libraries like JQuery, ...)

推荐答案

太快的问题,相同的这里关于IntelliJ,但使用Eclipse回答。

Too quick question, same here about IntelliJ, but with Eclipse answer.

v2.0中支持此功能( SLE-26 )。

This feature will be supported in v2.0 (SLE-26).

但是,有一个解决方法...

However, there is a workaround ...

免责声明:这个工作d不是SonarSource支持的 ,这不是可持续的解决方案,而是在生产环境中部署不得。这只是一个技巧的乐趣,直到插件正式支持功能。

Disclaimer : This workaround is not supported by SonarSource, this is not a sustainable solution and MUST not deployed on a production environment. This is just a "technical stuff for fun", until feature supported officially by the plugin.

先决条件


  • SonarQube > = 5.2 (使用RC3测试)

  • 使用SonarLint < v1.3 (严格来说,请参阅 SLE-24

  • SonarQube实例不能被保护( sonar.forceAuthentication = false

  • SonarQube >= 5.2 is required (tested with RC3)
  • Use SonarLint < v1.3 (strictly, see SLE-24)
  • SonarQube instance must not be secured (sonar.forceAuthentication=false)

SonarLint使用Eclipse首选项进行URL加载(请参阅 SonarRunnerFacade ),所以可以覆盖 pluginCustomization

The SonarLint uses Eclipse preferences for URL loading (See SonarRunnerFacade), so could be overrided with pluginCustomization.

eclipse.ini 文件(eclipse.exe 旁边)中,添加首先:

In the eclipse.ini file (beside eclipse.exe), add in first :

-pluginCustomization
myPrefs.ini
-startup
...

myPrefs.ini f ile(eclipse.exe / eclipse.ini 旁边)

With in myPrefs.ini file (beside eclipse.exe/eclipse.ini) :

# SonaQube - SonarLint URL override
org.sonarlint.eclipse.core/server_url=http\://localhost:9000

这篇关于SonarLint for Eclipse:配置一个自定义SonarQube&amp;语言档案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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