Questions tagged [sonarcloud]

SonarCloud is the code quality cloud service provided by SonarSource.

The main features of SonarCloud are:

  • 16 languages: Java, JS, C#, C/C++, Objective-C, TypeScript, Python, ABAP, PLSQL, T-SQL and more.
  • Thousands of rules to track down hard-to-find bugs and quality issues thanks to powerful static code analyzers.
  • Cloud CI Integrations, with Travis, VSTS, AppVeyor and more.
  • Deep code analysis, to explore all source files, whether in branches or pull requests, to reach a green quality gate and promote the build.
  • Fast and Scalable
227 questions
1
vote
3 answers

Unable to select "SonarCloud/Quality Gate" in "Require approval from additional services" in branch policies

According to the tutorial written on the sonarcloud blog (https://blog.sonarsource.com/integrate-sonarcloud-with-vsts-to-boost-code-quality) and the Azure DevOps lab (https://www.azuredevopslabs.com/labs/vstsextend/sonarcloud/) I should be able to…
Andries
  • 175
  • 1
  • 9
1
vote
0 answers

List of organizations given an user id or username

I am trying to obtain a list of organizations that belongs an userId or username from the sonarcloud api. The uri I want to expose looks like https:///users/{userId,username}/organizations. Do you have any experience that complains this use case? I…
1
vote
1 answer

How to apply an existing sonarQube rule for only given class type

Please help me to solve these problems. Simply I want to apply an existing sonarqube rule for only certain type of classes. As far as I know, we can use class tree to get the classes and identify the target class. The thing I want t know is how can…
Chanaka Fernando
  • 2,176
  • 19
  • 19
1
vote
1 answer

Branch coverage is not shown in Sonarcloud when syncing with master branch

I'm trying to run analysis on my code using jacoco plugin in gradle and sonarqube. My tests are written in Groovy. I've automated the process using bitbucket pipelines, so every time I commit code, the tests are run, and the jacoco analysis and…
gfe
  • 31
  • 8
1
vote
1 answer

Travis CI not sending Jacoco reports to SonarCloud

I have a Spring Boot project repository on Github with Travis CI integrated. Currently Travis CI is configured to build the project for commits and Pull requests, which works fine. Next, I want to send a Jacoco report to SonarCloud. I have followed…
Meena Chaudhary
  • 9,909
  • 16
  • 60
  • 94
1
vote
1 answer

An error occurred while loading the YAML build pipeline. The service connection name 00000000-0000-0000-0000-000000000000 is ambiguous

We have azure build pipelines, some are in visual editor and few are in yaml. I am trying to add sonarcloud analysis to these pipelines. This work fine in the visual editor, I am copying same yaml from visual editor to add in existed yaml pipeline.…
1
vote
1 answer

SonarCloud: How To Use T-SQL rules instead of PL/SQL rules

I have c# code and Database projects in the repo that I am getting scanned on SonarQube. However, the SQL scripts are scanned using the PL/SQL rule set rather than the T-SQL rule set. Is there a setting to tell Sonar to do it in an expected way?
Kangkan
  • 15,267
  • 10
  • 70
  • 113
1
vote
1 answer

Publish Test Coverage of .NET Core Project from Azure DevOps to SonarCloud

Good day, I followed this guide to set-up integration of Azure DevOps and SonarCloud: https://learn.microsoft.com/en-us/labs/devops/sonarcloudlab/index Everything goes well, I was able to setup build on master branch as well as builds on PRs. One…
1
vote
0 answers

Get PullRequest Number From Gradle

I am trying to setup Sonarcloud within a Gradle job. Can someone point me to the right way to get the last pull request from the current branch within Gradle? I need it for the key property.
1tSurge
  • 663
  • 2
  • 7
  • 20
1
vote
1 answer

How to get sonarcloud running on Travis Ci with Python code

My question is rather simple: How to insert Python Code on SonarCloud with Travis-Ci? I made the previous steps: Create a project in Github Assign that project in Travis-Ci Create a new project analysis on SonarCloud and get the Token Set up the…
1
vote
1 answer

How to prevent the pull request integration for SonarQube to report issues as inline comments on Githuib?

I configured SonarQube analysis to report it's status to pull requests on my GitHub project. SonarCloud already supports pull requests as first class citizen as described in https://blog.sonarsource.com/sonarcloud-loves-your-build-pipeline. As I…
Sebastian
  • 1,651
  • 1
  • 11
  • 12
1
vote
1 answer

Sonarcloud not finding obvious C problems

I made a very simple C file just to test the output of sonarcloud when using C code. My entire code is this: #include #include int main() { int i; for(int j = 0; j < 100; j++) { void* unreleasedMemory = malloc(1024); …
Boris Prohaska
  • 912
  • 6
  • 16
1
vote
1 answer

SonarCloud with VSTS has error Duplicate ProjectGuid: "00000000-0000-0000-0000-000000000000"

We added SonarCloud to the build pipeline of a large solution. Only one project in our solution is analyzed but we see this warning WARNING: The following projects do not have a valid ProjectGuid and were not built using a valid solution (.sln)…
Mathias Rönnlund
  • 4,078
  • 7
  • 43
  • 96
1
vote
2 answers

SonarQube failed to analyze my solution

I'm trying to setup SonarQube for my open source project but I've difficulties to automatize the process with my CI (AppVeyor). SonarQube analysis failed with no more details except that I have to look at the log. But I don't know where to look at…
Julien Pires
  • 512
  • 7
  • 18
0
votes
1 answer

Sonarcloud coverage includes tests

I have a python project and a pipeline where I run tests and send info to sonarcloud. The issue is that Coverage gate includes my test folders which lowers the total value. How do I fix it? My folder structure, I want only…
Vitamin C
  • 135
  • 11