Skip to content

Commit

Permalink
Merge pull request #1387 from jhipster/update-sonar
Browse files Browse the repository at this point in the history
Update Sonar instructions to match README
  • Loading branch information
DanielFran committed Sep 18, 2024
2 parents 7e310c7 + 84a9b1c commit a241823
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/tests-and-qa/code-quality.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ docker-compose -f src/main/docker/sonar.yml up -d
If you use Maven, it has been automatically configured:

```shell
./mvnw -Pprod clean verify sonar:sonar -Dsonar.host.url=http://localhost:9001
./mvnw -Pprod clean verify sonar:sonar -Dsonar.login=admin -Dsonar.password=admin
```

If you need to re-run the Sonar phase, please be sure to specify at least the `initialize` phase since Sonar properties are loaded from the sonar-project.properties file.

```shell
./mvnw initialize sonar:sonar -Dsonar.host.url=http://localhost:9001
./mvnw initialize sonar:sonar -Dsonar.login=admin -Dsonar.password=admin
```

If you use Gradle, it has also been automatically configured:

```shell
./gradlew -Pprod clean check jacocoTestReport sonarqube -Dsonar.host.url=http://localhost:9001
./gradlew -Pprod clean check jacocoTestReport sonarqube -Dsonar.login=admin -Dsonar.password=admin
```

In every cases you can, now, run analysis with [sonar-scanner](https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner) if you already have installed it.
You can also run an analysis with [sonar-scanner](https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner), if you have it installed.

```shell
sonar-scanner
Expand Down

0 comments on commit a241823

Please sign in to comment.