Why sonar cloud shows Uncovered Code in new Typescript code

  • ALM used (Bitbucket Cloud)
  • CI system used (Bitbucket Cloud)
  • Scanner command used when applicable (private details masked)
  • Typescript

Why sonar cloud analyzer is not covering the code??
In my case Lines to cover are 7
And Lines Covered is also 7

Please help me fix this issue

Hi @talhameer,

Welcome to the Sonar Community,

Do you mean this section of the analysis report?
image

If so, then it means that you need to increase your test coverage.

SonarCloud itself does not calculate coverage. To include coverage results in your analysis, you must set up a third-party coverage tool and configure SonarCloud to import the results produced by that tool (see below). This feature is only available for CI-based analysis. It is not available for automatic analysis.

More information can be found here: Test Coverage | SonarCloud Docs

No, I’m not asking about test coverage. I’m asking about Overall Code (the screenshot perfectly identifies the problem).

I’m also facing many other issues, can you please DM me so we can make our code clean and more robust.