-
Notifications
You must be signed in to change notification settings - Fork 203
[CLOV-807][maintenance] integrate sonarqube for backpack #4082
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
sonar-project.properties
Outdated
| # Files to include in all analysis _except_ for code coverage | ||
| sonar.coverage.exclusions=\ | ||
| **/*.test.*,\ | ||
| **/*accessibility-test.*,\ |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add more format here, so that sonarqube can use
| @@ -0,0 +1,40 @@ | |||
| sonar.projectKey=skyscanner_backpack | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file needs to be refined after sonarqube analysis
| Build: | ||
| permissions: | ||
| contents: read |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sonarqube job needs read permissions
Remember to include the following changes:
[Clover-123][BpkButton] Updating the colourREADME.md(If you have created a new component)README.md