Analyze projects vs manually create sonar cloud project

Hi team,

We are using Azure DevOps, and our code coverage tool is Sonar Cloud. Now we are planning to create project automation with the use of web API calls instead of manually setting up and importing projects.

  1. What is the difference between web API calls to create projects and manual setup?
  2. Which is good for practice, and why?

Thanks,
Nagarjuna

Hey there.

When creating a “manual” project, it will not be [bound] by default (Bind your DevOps platform & SonarCloud) and will therefore not support features like PR Decoration.

You can bind after the fact (that’s a new feature!) in the project administration, and reverse engineer the Web API to figure out how to do that in your automation.

Thanks Colin,

So, you mean If we choose to use an automation script, it will add the project but not provide PR decoration. Alternatively, we can use import projects and set up new code as clean policy? Is it correct?

Are there any web API calls available for automation to import projects and set up new code as clean policies?

Thanks,
Nagarjuna

Hey there.

I don’t really understand what you mean by this.

above two options select with web API calls without manually selecting the options.

Thanks,
Nagarjuna

Take a look at the guide I sent you earlier.