"We can't display your Quality Gate without a New Code definition." for new project

Template for a good new topic, formatted with Markdown:

  • ALM use: GitHub
  • CI system used: GitHub Actions
  • Scanner command used when applicable (private details masked)
  • Languages of the repository
    Language: Javascript

Hello,

I have a monorepo with 2 projects in sonarcloud, one for java (first created project) and one for javascript. The problem is, ever since I created the javscript project the status is NOT COMPUTED although a lot of commits were merged. Also, for every feature branch the number of issues is 0 (code smells, bugs, security hotspots, etc.) making the check useless.
Can you please let me know what I should do to fix it?

P.S: For master branch the number of issues is correctly displayed, the problem is only for feature branches.

Thanks!

Hi @georgemarin , welcome to the community forum!

1/ Quality gate is not computed

About the “Not computed” status of the quality gate, you probably need to configure the New Code period for your Javascript project. Here is the documentation to do that. This setting is required if your quality gate contains some conditions based on “new code”, like “new code smells” for example.

2/ Issues count on feature branches is 0

On feature branches, SonarCloud shows only the issues found on code updated on the branch, compared to the target branch. If the files changed on the branch have no issue (because no issues has been found, or because they are all excluded from the analysis), then the count will be 0.
You can check which files have been analyzed for a given branch using the “Code” tab on the UI. If you see the files you expect to be analyzed, then everything is fine!
If some files are missing, you probably need to configure the Analysis scope.

Hello Claire,

First of all, thanks for your reply. I’ve updated the quality gate conditions to apply to the overall code. Thanks for your help!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.