This repository contains a simple Java Maven project with intentional code quality issues.
It is used to demonstrate how static code analysis and quality gates work in a CI/CD pipeline using SonarCloud and GitHub Actions.
The goal of this lab is to help students understand:
- Why code quality matters
- How CI/CD pipelines react to code changes
- How SonarCloud identifies bugs, vulnerabilities, and code smells
⚠️ Do not change the project structure before starting the lab.
Follow the lab sheet instructions for detailed steps.
- Fork this repository to your GitHub account
- Connect your forked repository to SonarCloud
- Add a GitHub Actions workflow for CI analysis
- Observe Quality Gate results in SonarCloud
- Fix reported issues and re-run the pipeline
- Java 17
- Maven
- GitHub account
- SonarCloud account
By completing this lab, students will be able to:
- Integrate a GitHub repository with SonarCloud
- Run static code analysis as part of a CI pipeline
- Understand Quality Gates and their impact on CI/CD
- Improve code quality based on SonarCloud feedback
- This project is intentionally imperfect.
- Quality issues are expected and required for the lab.
- Do not aim for a green Quality Gate in the first run.