SonarQube: Difference between revisions

From air
Jump to navigation Jump to search
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:




SonarQube® software (previously called [[Sonar]]) is an open source quality management platform, dedicated to continuously analyze and measure technical quality, from project portfolio to method. SonarQube platform can be extended by open source and commercial plugins.
http://www.sonarsource.org


https://docs.sonarqube.org/
=Sonar en 10 minutes top chrono=

1) Lancer le container Sonar
https://docs.sonarqube.org/display/PLUG/Plugin+Library

=SonarQube en 10 minutes top chrono=
1) Lancer le container SonarQube
<pre>
<pre>
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube
Line 11: Line 15:
2) Copier (ou modifier) le fichier suivant dans ~/.m2/settings.xml
2) Copier (ou modifier) le fichier suivant dans ~/.m2/settings.xml
<pre>
<pre>

<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://localhost:9000
</sonar.host.url>
</properties>
</profile>
</profiles>
</settings>


</pre>
</pre>
Line 20: Line 44:
</pre>
</pre>


4) Ouvrir la page des rapports Sonar http://localhost:9000
4) Ouvrir la page des rapports SonarQube http://localhost:9000


Attention: l'accès aux rapports n'est pas sécurisé
Attention: l'accès aux rapports n'est pas sécurisé

Latest revision as of 08:21, 21 December 2017


SonarQube® software (previously called Sonar) is an open source quality management platform, dedicated to continuously analyze and measure technical quality, from project portfolio to method. SonarQube platform can be extended by open source and commercial plugins.

https://docs.sonarqube.org/

https://docs.sonarqube.org/display/PLUG/Plugin+Library

SonarQube en 10 minutes top chrono

1) Lancer le container SonarQube

docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube

2) Copier (ou modifier) le fichier suivant dans ~/.m2/settings.xml


<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://localhost:9000
                </sonar.host.url>
            </properties>
        </profile>
     </profiles>
</settings>

3) Dans votre projet Maven

cd mon_projet
mvn clean verify sonar:sonar

4) Ouvrir la page des rapports SonarQube http://localhost:9000

Attention: l'accès aux rapports n'est pas sécurisé