Angular 13 Code not appearing on sonar analysis

I’m using the sonar-project.properties below:

sonar.projectKey=<my_projkey>

sonar.organization=<my_org>

sonar.projectName=<my_projname>

sonar.projectVersion=1.0

sonar.sources=.

sonar.sourceEncoding=UTF-8

sonar.exclusions=node_modules/**,**/*.spec.ts,package-lock.json,src/assets/**

sonar.tests=.

sonar.test.inclusions=**/*.spec.ts

sonar.javascript.lcov.reportPaths=.coverage/lcov/lcov.info

When analyzed, no .ts / .scss code are published.

I used Azure devops and sonar-scanner locally and the problem persists.

How i fix this?

Hey there.

It looks like you are analyzing a short-lived branch (I can tell because there’s no Activity tab in your screenshot). Short-lived branches only report changes on changed (new) code.

  • Are there results for JS/TS code in your Main branch?
  • Have you changed Javscript/Typescript files in this specific branch?
  • Any warnings in your scanner logs?