Can we use CI based Analysis and Automatic Analysis same repo for sonarCloud

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps)
  • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI
  • Scanner command used when applicable (private details masked)
  • Languages of the repository
  • Only if the SonarCloud project is public, the URL
    • And if you need help with pull request decoration, then the URL to the PR too
  • Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
  • Steps to reproduce
  • Potential workaround

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Can we use CI based Analysis(for future branch other than main branch ) and Automatic Analysis(for main branch or default branch) in same repo for sonar Cloud??

I want to analyze the main branch and future branches automatically , what is the best process and supported process??

Hi @epneo-banuprakash

Welcome to the Sonar Community!

In short, you can’t combine Automatic and CI-based analysis on the same project in SonarCloud. You can find more on this documentation page.

The main difference between Automatic and CI-based analysis is that the former doesn’t require configuration. SonarCloud will detect the languages in your code base and run the corresponding analysis accordingly. However, you’ll not get a test coverage.

For CI-based analysis, you have total control over how you run your analysis. It will run “automatically” on the main branch and any other branch you push to your repository, given that you configured it correctly. An example of setting up a GitHub action can be found here.

I hope this answers your question.