During continuous integration builds, the FOLIO Jenkins will gather the generated coverage reports and send them to SonarCloud for analysis.
The project’s Jenkinsfile requires the setting:
runSonarqube = true
(See notes for initial configuration of a new front-end repository.)
A specific set of filesystem paths are excluded by the scanner. That covers most situations – send a pull-request if more are needed.
The project’s testing framework will generate the code coverage reports, and the sonar-scanner will look for them in these filesystem locations:
Note that it is possible for a UI project to use two separate testing frameworks. Configure the tools so that each one generates their report into one of those separate directories. The SonarCloud facility will analyse and merge the reports.
For back-end Maven-based modules, the SonarQube scanner “sonar-maven-plugin” will utilise JaCoCo to generate the code coverage reports.
No additional configuration is required in the project’s Jenkinsfile.
(See notes for initial configuration of a new back-end repository.)
- Code analysis and linting facilities including notes about rule customization.