Missing blame information for the following spec.ts files angular

Hello
When adjusting this field in the sonarqube-project.properties file, it looks like files get excluded in the code, but even ones that aren’t included. Also, it seems like we can’t add files back to the coverage.
I need only test .ts files to cover
sonarqube-project.properties file,

sonar.host.url=http://localhost:9000
sonar.login=admin
sonar.password=*******
sonar.projectKey=test-app
sonar.projectName=test-app
sonar.projectVersion=1.0
sonar.sourceEncoding=UTF-8
sonar.sources=src
sonar.tests=src
sonar.exclusions=**/*.spec.ts, **/*test.ts,**/*.js,**/*constant.ts,**/*.scss,**/*interface.ts, *.html
sonar.test.inclusions=**/*.spec.ts
sonar.coverage.exclusions=**/*.js,src/main.ts,src/polyfills.ts,**/*environment*.ts,**/*module.ts,**/*.scss,**/*interface.ts, *.html
sonar.javascript.lcov.reportPaths=coverage/lcov.info

And also after run => Missing blame information for the following files:

WARN:   * src/app/admin/menu/addon-list/addon-list.component.spec.ts
WARN:   * src/app/admin/sidebar/sidebar.component.spec.ts

Any help appreciated. Thank you

Hi,

Welcome to the community!

It’s not clear to me what you’re trying to do.

sonar.sources and sonar.tests should be two disjoint sets. Since you’ve got everything together under src then you’ll need to distinguish what’s what with inclusions and exclusions. When you use sonar.exclusions you’re saying "don’t treat these files as source files. Similarly, sonar.test.exclusions determines which files should not be treated as tests. Inversely the two inclusions fields/parameters describe which files to treat as either source or test files. The docs should help.

You can only have coverage on source files. If it’s not a source file (it has been excluded) then coverage on it makes no sense.

Do those files get modified as part of your build?

 
HTH,
Ann