- ALM used: GitLab CI/CD, Salesforce
- CI system used: GitLab CI/CD
- Scanner command used in GitLab CI/CD pipeline:
sonar-scanner
-Dsonar.projectKey=[REDACTED]
-Dsonar.organization=[REDACTED]
-Dsonar.apex.coverage.reportPath=test-result-codecoverage.json
-Dsonar.qualitygate.wait=true
-Dsonar.verbose=false
-X
- Languages of the repository: Apex (.cls files) and JavaScript (Lightning Web Component, which is a UI framework similar to React, tests written using Jest)
- Error observed:
SonarCloud managed to scan the Apex codebase and picked up on the Apex Code coverage from the test-result-code-coverage.json but not able to pick up the JavaScript codebase as well as the tests and code coverage.
I’ve read a few other posts regarding this and saw that the MSBuild and Maven Scanner can pick up and scan other languages provided there are references in the code or changing some form of configuration. I was wondering if something like that can be applied to my current situation?
If not, can you please recommend the best approach we should take in order to allow the scanning of both project types in our CI pipeline?