首页 文章

SonarQube生态系统升级(SonarQube和SonarLint)

提问于
浏览
4

由于SonarQube 5.1的问题分配区域存在一些问题,我们正在使用SonarQube 5.1并希望升级到SonarQubee 5.2或5.3我们也使用SonarQube eclipse插件3.5.0

我最近注意到,根据http://docs.sonarqube.org/display/SONAR/SonarQube+in+Eclipse,SonarQube 5.2不支持SonarQube eclipse插件3.5.0 .

最新的SonarLint版本1.2也无法连接到远程Sonar实例来获取服务器规则 . SonarQube eclipse插件3.5.0提供此功能 . 我在Stackoverflow上发现SonarLint会在2.0版本支持此功能但是没有计划的发布日期为2.0 Getting remote config file for SonarLint if online, using local if offline

  • 我的问题是为什么SonarQube生态系统升级不同步? SonarQube eclipse插件应支持最新的SonarQube版本,直到SonarLint能够连接到远程Sonar实例以获取服务器规则 .

  • 任何应该采用SonarQube升级来解决现有版本问题的人都可以执行日食分析?

2 回答

  • 0

    正如您所读到的那样,SonarQube Eclipse plugin已被弃用,而不是SonarLint for Eclipse . 其背后的主要原因之一是,SonarLint for Eclipse旨在成为一个独立的产品,其生命周期必须与SonarQube分离 - 以便在IDE中简化和加速用户体验的创新 . 因此,到目前为止,SonarQube和SonarLint升级根据定义不同步 .

    不过,您的问题完全有效:只要SonarLint无法连接到SonarQube服务器,为什么我们不在SQ Eclipse插件上进行最后更新?主要原因是我们在SonarLint中非常相信我们希望将所有注意力和精力集中在该产品上,因此我们希望尽快实现“尽快连接到SonarQube”体验 . 我们的遥测告诉我们,大多数现有用户和客户目前正在使用仍可与SQ Eclipse插件一起使用的SonarQube版本,所以我觉得这是在SonarLint上尽可能快地工作以确保它可以连接到SonarQube实例在即将到来的几个月(当下一个LTS发布时) .

  • 5

    以下组合工作正常(SonarLint SonarScanner SonarQube Eclipse):


    SonarLint: 3.5.0.201804241315
    sonarScanner: sonar-scanner-3.2.0.1227-windows
    SonarQube:  6.7.4 (build 38452)
    

    sonar-scanner.properties:

    sonar.host.url=http://localhost:9000
    sonar.sourceEncoding=UTF-8
    
    sonar.projectKey=JavaProject
    sonar.projectName=MyJavaStandaloneProject
    sonar.projectVersion=0.0.1-SNAPSHOT
    sonar.sources=D:/eclipse/workspace/MyJavaStandaloneProject
    sonar.java.binaries=D:/eclipse/workspace/MyJavaStandaloneProject/target/classes
    

    pom.xml:

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>3.2</version>
            </plugin>
        </plugins>
    </build>
    

    将Eclipse项目绑定到SonarQube项目:

    选择SonarQube服务器: localhost
    Eclipse项目:MyJavaStandaloneProject
    SonarQube项目:服务器localhost上的'MyJavaProject'

    单击:自动绑定所选项目 .

    “注意:SonarQube项目:服务器localhost上的'MyJavaProject'
    可以通过单击“自动绑定”按钮自动配置 . “


    完成所有配置 .


    右键单击项目和 Run As Maven构建...
    目标: sonar:sonar


    [INFO] ANALYSIS SUCCESSFUL

相关问题