We have implemented microfrontend in our angular project that results in ‘Projects’ folder getting created parallel to ‘src’ folder.
src component uses libraries, components from ‘projects’ folder to implement some features.
we have saperate tests and respected lcov files for all modules in ‘projects’ folder plus ‘src’ folder that we are providing in ‘sonar.typescript.lcov.reportPaths’.
Problem is while running the scan for ‘src’ folder, inside lcov file we get entries for ‘projects’ libraries as well, which we need to avoid.
below are the version details for -
SonarQube : 7.9
typescript 4.2.4 (added as dev dependency)
Below is the sonar-project.properties files -
sonar.projectKey=com.myproject sonar.projectName=MyProject sonar.projectVersion=1.0 sonar.sourceEncoding=UTF-8 sonar.host.url=http://localhost:9000/ sonar.login=*** sonar.analysis.mode=publish sonar.issuesReport.console.enable=true sonar.sources=src,projects sonar.typescript.lcov.reportPaths=projects/global/coverage/lcov.info,projects/shared/coverage/lcov.info, coverage/lcov.info sonar.exclusions=**/*.spec.ts,**/*.stub.ts,**/coverage/** sonar.java.binaries=**/target/classes sonar.java.libraries=**/target/*.jar sonar.coverage.exclusions=few-regEx-to-exclude-targetted-files
Folder structure -
Coverage folder for src looks like below -
Any help would be appreciated.