Skip to content

Commit 48b8377

Browse files
committed
chore(init_sonarqube) exclude main class from tests
1 parent 40f2b51 commit 48b8377

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,31 @@ Tests use **Testcontainers** to spin up ephemeral Docker containers for external
127127

128128
> **Prerequisite for tests**: Docker must be installed and running.
129129
130+
---
131+
132+
## 🔎 Code Quality (SonarQube)
133+
134+
A GitHub Actions workflow is configured in:
135+
136+
```bash
137+
.github/workflows/sonar.yaml
138+
```
139+
140+
### Workflow triggers
141+
142+
- `push` on all branches
143+
- `pull_request`
144+
145+
### What it runs
146+
147+
- Java 25 setup (Temurin)
148+
- Maven build + tests + SonarQube analysis:
149+
150+
```bash
151+
mvn clean verify sonar:sonar
152+
```
153+
154+
130155
---
131156

132157
## 📁 Project structure
@@ -156,7 +181,7 @@ This project consumes the public **Random User Generator** API:
156181

157182
## ✅ Todo
158183

159-
- [ ] [Add Sonarqube in the project](https://github.com/XPEHO/spring_boot_java_random_user/issues/2)
184+
- [x] [Add Sonarqube in the project](https://github.com/XPEHO/spring_boot_java_random_user/issues/2)
160185
- [ ] [Add PostgreSQL database with docker](https://github.com/XPEHO/spring_boot_java_random_user/issues/6)
161186
- [ ] [Add this endpoint get /user/random](https://github.com/XPEHO/spring_boot_java_random_user/issues/5)
162187
- [ ] [Add this endpoint get /user/{id}](https://github.com/XPEHO/spring_boot_java_random_user/issues/8)

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
</scm>
2929
<properties>
3030
<java.version>25</java.version>
31+
<sonar.coverage.exclusions>**/*Application.java</sonar.coverage.exclusions>
3132
</properties>
3233
<dependencies>
3334
<dependency>

src/sonar-project.properties

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)