[TypeScript] How analysis cache works for branches

I’m running code analysis for TypeScript language. I’m doing it in Github Actions using SonarSource/sonarqube-scan-action.

Currently it works in a way that analysis executed for feature branch uses main cache. Therefore in the UI, for the branch, I’m getting only new code analysis and no “overall”.

Is there any way to scan branch independently and get “overall” results also for branch ?

Hey there.

What version of SonarQube are you using?

It’s 9.9.1.69595

Thanks.

This sounds like how Pull Request Analysis works (only seeing the changes between your source and target branch).

You can also execute Branch analysis, which will give you full results for the branch. In the context of GitHub actions, you would need to make sure the pipeline run is being triggered independently of a pull request.