[CLOV-807][maintenance] integrate sonarqube for backpack#4082
[CLOV-807][maintenance] integrate sonarqube for backpack#4082Flora Cheng (floracheng292) wants to merge 6 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR integrates SonarQube analysis into the Backpack repository for code quality monitoring and static analysis. The integration adds automated code scanning to the CI/CD pipeline with coverage reporting and PR feedback.
Key changes:
- Adds SonarQube configuration file with project settings and analysis rules
- Enables comprehensive Jest coverage reporting (text, clover, json, lcov formats)
- Implements SonarQube workflow job in GitHub Actions with coverage upload and PR feedback
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| sonar-project.properties | Defines SonarQube project configuration including source paths, exclusions, and coverage settings |
| package.json | Extends Jest coverage reporters to generate reports compatible with SonarQube |
| .github/workflows/_build.yml | Adds coverage artifact upload and new SonarQube job for automated code analysis |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Files to include in all analysis _except_ for code coverage | ||
| sonar.coverage.exclusions=\ | ||
| **/*.test.*,\ | ||
| **/*accessibility-test.*,\ |
There was a problem hiding this comment.
Trailing comma on line 37 in sonar.coverage.exclusions property may cause parsing issues in some SonarQube versions. Remove the trailing comma after the last pattern.
| **/*accessibility-test.*,\ | |
| **/*accessibility-test.* |
|
Visit https://backpack.github.io/storybook-prs/4082 to see this build running in a browser. |
|
Visit https://backpack.github.io/storybook-prs/4082 to see this build running in a browser. |
|
Visit https://backpack.github.io/storybook-prs/4082 to see this build running in a browser. |
| "text", | ||
| "clover", | ||
| "json", | ||
| "lcov" |
There was a problem hiding this comment.
Add more format here, so that sonarqube can use
| @@ -0,0 +1,40 @@ | |||
| sonar.projectKey=skyscanner_backpack | |||
There was a problem hiding this comment.
This file needs to be refined after sonarqube analysis
|
|
||
| Build: | ||
| permissions: | ||
| contents: read |
There was a problem hiding this comment.
Sonarqube job needs read permissions
|
We cannot enable Sonarqube on this repo at the moment. Closing the PR |
Remember to include the following changes:
[Clover-123][BpkButton] Updating the colourREADME.md(If you have created a new component)README.md