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
0
votes
1 answer

How can I resolve this issue on SonarCloud?

Using SonarCloud I got this bug: Use try-with-resources or close this "ResultSet" in a "finally" clause This is the following code: public long executeUpdate() throws SQLException { if (query != null) { try { …
Giuseppe Boezio
  • 101
  • 1
  • 11
0
votes
3 answers

SonarCloud code coverage remains 0.0 in GitHub Actions build

I have setup CI for a .NET Core solution using GitHub Actions. When code is pushed to the master branche, the solution is build, the unit tests are run and code analysis is run with SonarCloud. The code analysis step is actually performed by…
ngruson
  • 1,176
  • 1
  • 13
  • 25
0
votes
0 answers

How do I configure SonarCloud to detect and flag public methods and classes without any Javadoc

I want to use SonarCloud to flag code checked-in in the Pull Request if it does not have Javadoc added for public methods and classes. Unfortunately, I could not find much help online. Any help?
Abhijeet Vaikar
  • 1,578
  • 4
  • 27
  • 50
0
votes
1 answer

SonarCloud doesn't analyse Xamarin forms project

I have a solution in Xamarin stored in Azure devOps git repository. I've created a pipeline to analyse the code on SonarCloud. My Xamarin solution contain 3 projects (Xamarin forms, Xamarin Android, Xamarin iOS). Here is the pipeline: When I run…
0
votes
1 answer

How to override project key and other settings via command line for Maven Sonar scanner

I'm trying to set the projectkey via command line but Maven is ignoring it. I tried to run this: mvn sonar:sonar -Dsonar.projectKey=myprojectkey but when I look at the output, it's using the project name of the POM for the project key not my…
red888
  • 27,709
  • 55
  • 204
  • 392
0
votes
1 answer

Android Studio Integration with Sonar Cloud

I'm getting an Authorisation Error while executing "gradlew sonarqube" I've added these properties in app level gradle sonarqube { properties { property 'sonar.sourceEncoding', 'UTF-8' property 'sonar.projectName', 'ToDoTest' property …
0
votes
1 answer

Sonarqube analysis failing for huge code base - None of the configured nodes were available

Sonarqube analysis completes, but the report processing fails for project with huge code base. Issue is showing up for project with 220K lines of code. Sonarqube version - 7.9.1 - Running on Kubernetes I tried deleting the data/es folder for fresh…
Upen
  • 1,388
  • 1
  • 22
  • 49
0
votes
0 answers

trying to convert simple curl command to invoke-webrequest but not working

I have a very simple curl command, this works for me (not using basic auth- the service just expects the token to be in URL): curl -v -X POST https://Dkdjhf928hfDJFSDFJSK@sonarcloud.io/api/projects/create -d…
red888
  • 27,709
  • 55
  • 204
  • 392
0
votes
1 answer

How can I integrate sonarcloud with bitbucket?

I am very new to sonarcloud. I am trying to implement sonarcloud into the bitbucket pipeline. I follow the tutorial for sonarcloud to analyze the new project then I get following code to run. sonar-scanner.bat -D"sonar.projectKey=mywebsite"…
user1687891
  • 794
  • 2
  • 14
  • 30
0
votes
2 answers

SonarCloud branch has no lines of code - bitbucket pipelines - sonarsource/sonarcloud-scan

I am trying to integrate sonarcloud with Bitbucket pipeline. I have a simple test project with single file named index.php consisting few lines. I am exactly not sure what method should I follow. I have created sonar-project.properties files that…
nas
  • 2,289
  • 5
  • 32
  • 67
0
votes
1 answer

Travis CI SonarCloud - How to choose what quality profile to be enabled?

From the Job log it looks like Travis enable all Sonar way that is available ... INFO: Quality profile for css: Sonar way INFO: Quality profile for java: Sonar way INFO: Quality profile for js: Sonar way INFO: Quality profile for ruby: Sonar…
0
votes
1 answer

Does SonarCloud's "delete branch" remove the origin branch from your repo?

I'm using SonarCloud to quality control the code that I am writing on my open source project. I have a master (main branch) from which I have develop from which I make all of my feature branch. SonarCloud is connected to my GitHub repo from which I…
goldy1992
  • 893
  • 11
  • 17
0
votes
1 answer

SonarCloud: Getting error when running ant and sonar connecting to sonar cloud

We have a setup where we use SonarQube with Ant and connect to SonarCloud (https://sonarcloud.io). This setup was always working from local developer machine and also from bitbucket pipelines. Since two days, we have been getting below error on…
Bhavik Bhagat
  • 960
  • 8
  • 19
0
votes
2 answers

Security token not effective on SonarCloud

On SonarCloud, I created an organization and a user (from GitHub), plus a project. For the user I created a token. Then I ran the command mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.5.0.1254:sonar -Dsonar.projectKey=
Ivan dal Bosco
  • 3,233
  • 4
  • 19
  • 24
0
votes
0 answers

Github No access to code for app integrations

I am trying to setup SonarCloud for Github, and getting the following issue (see screenshot). I know that github recently changed some of its permission models, so how can i allow an app access to code? The lead up issue statement is that I want…
securisec
  • 3,435
  • 6
  • 36
  • 63