Force re-analysis of a repository?

Hello, I am very new to SonarCloud and I was wondering if there’s an option on how to force SonarCloud to force an additional analysis for a repository. Otherwise, I would wonder how frequently does SonarCloud analyze a repository for potential bugs etc.

Thanks for your time

Hi @jasperan ,

Welcome to the community!
To help me answering your question, could you clarify what Git provider (e.g. GitHub, Azure, etc…), and which Analysis Method (e.g. Automatic Analysis, or CI based: Travis, Circle CI, etc…) you are using?


Hi Ignacio,

The general idea is that SonarCloud analyzes your code every time you make a change to the main branch or to a pull request branch (or to some other branch if you have set that up).

The details depend on the analysis method you use (Automatic analysis vs CI-based analysis) and that depends, primarily, on the language you want to analyze.

I recommend having a look at the docs to familiarize yourself with how it all works:

Hi, thank you both for your responses.
@AlxO it’s GitHub. I think it’s automatic analysis what we have. I also think we only have capabilities to analyze the code in the main branch, because the other development branches are not showing up.

@Peeter_Piegaze great! I will make sure to check out the documentation provided. The repository has something like 98% Python code insofar. Do you know if a draft pull request would still triger code analysis?

Since your repo is Python, when you imported it SonarCloud will have immediately kicked-in to automatic analysis mode. This means that you don’t have to set anything else up in a build pipeline or anything like that.

So, every time you open a PR, commit to a PR, merge a PR into the main branch or commit directly to the main branch an analysis should be triggered.

Analyses of PRs vs main branch are two independent things: PR analyses just report issues in the PR, main branch analyses report all issues in the main branch, but they do emphasize the issues found in more recently changed code.

Just checked. Draft PRs will trigger an analysis just like regular PRs.

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