Using Sonarqube scanner to analyze project Code _ Code Analysis

Source: Internet
Author: User

Sonarqube Scanner, as a code scanning tool, through which the code of the project is read and sent to the Sonarqube server to allow Sonarqube code analysis.
It can be considered that Sonarqube scanner is the client of Sonarqube.

Sonarqube scanner is easy to integrate with different types of build tools and Maven project consolidation

A plug-in for the Sonarqube Scanner tool is available in the Maven repository as long as the following configuration is added to the setting.conf file

<settings>
    <pluginGroups>
        <plugingroup>org.sonarsource.scanner.maven</plugingroup >
    </pluginGroups>
    <profiles>
        <profile>
            <id>sonar</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            < Properties>
                <!--Optional URL to server. Default value is http://localhost:9000-->
                <sonar.host.url>
                  http://myserver:9000
                </ sonar.host.url>
            </properties>
        </profile>
     </profiles>
</settings >

After the configuration is complete, in the project, the execution MVN Sonar:sonar,sonarqube scanner automatically scans, according to the Pom.xml file to obtain the project related information, does not need the custom sonar-project.properties. Once the scan is complete, it will be uploaded to the Sonarqube server only. Later, the results of the analysis can be seen on the landing server. integration with Jenkins Building system

If the project you are building is the MAVEN standard project, you can press # #与Maven项目整合这种方式进行.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.