【问题标题】:Custome rule of SonarQube Sever, will be synch to sonarlintSonarQube 服务器的自定义规则,将同步到 sonarlint
【发布时间】:2017-10-07 10:33:14
【问题描述】:
我有 SonarqubeServer(Version 5.6.3),其中我成功添加了两个 java 自定义规则,两者在规则列表中也可见。
问题:我也在使用 Sonarlint 解决本地日食问题。像往常一样,它们是 SonarqubeServer(PMD,FindBug,CHeckStyle)使用的外部插件的同步问题。很好,我已经做到了。
所以现在我的问题是,Sonarlint 能否将我新添加的自定义规则同步到 SonarQubeServer?
如果是,那么为什么我无法在 Eclipse 类中看到那些自定义规则效果和报告。
【问题讨论】:
标签:
java
eclipse
sonarqube
sonarlint
【解决方案1】:
对此不确定,但我在 pom.xml 中激活了 Sonarlint 支持,它对我有用。这里是相关条目,见<sonarLintSupported>:
[...]
<build>
<plugins>
<plugin>
<groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
<artifactId>sonar-packaging-maven-plugin</artifactId>
<version>1.17</version>
<extensions>true</extensions>
<configuration>
<pluginClass>com.foobar.java.JavaRulesPlugin</pluginClass>
<sonarLintSupported>true</sonarLintSupported>
<sonarQubeMinVersion>5.6</sonarQubeMinVersion>
</configuration>
</plugin>
[...]