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
2
votes
2 answers

Run SonarCloud Analyze Manually From Visual Studio

I have paid account in Sonarcloud and Gitlab CI for automation, I use Visual Studio with integrated SonarLint for C#. Sometimes I want to run analyzing manually from VS and not using Gitlab runner every time. Is there a way to bypass pipeline? The…
user13821287
2
votes
1 answer

Searching for issues with Sonarcloud API returns none even though they exist

I am trying to get all the sonar report issues from a branch of a private Sonarcloud project. I do this with the following REST call: https://@sonarcloud.io/api/issues/search?projects=&branch= If I enter this call…
NicoB
  • 75
  • 9
2
votes
1 answer

I'm stuck with this "Make this anonymous inner class a lambda"

builder.hostnameVerifier(new HostnameVerifier() { @Override public boolean verify(String hostname, SSLSession session) { return hostname!=null; } }); I need help to refactor this code. I don't know from where to start. I've…
Piero Mele
  • 21
  • 1
2
votes
0 answers

Error SonarCloud with openjdk8 during pipeline gitlab-ci in java

I have a problem with Gitlab CI, Maven and SonarCloud. I use the jdk 8 so I had to use true to be able to use Sonar but however I still have an…
Jqk3
  • 37
  • 6
2
votes
0 answers

How to check for hardcoded secrets with with SonarCloud?

We are moving from SonarQube to SonarCloud. In SonarQube we are using Sonar Secrets plugin With the standard built in profiles we couldn´t find hardcodede secrets that we found with this plugin. Now I am not sure what we can do to check for…
Olga
  • 73
  • 1
  • 8
2
votes
1 answer

How can I get a top level coverage report for ALL my projects?

Asked support forum but they are unresponsive: https://community.sonarsource.com/t/how-can-i-get-a-top-level-coverage-report-for-all-my-projects/30286 I was looking in the UI and googling but didnt turn anything up I have 2 teams in bitbucket and…
red888
  • 27,709
  • 55
  • 204
  • 392
2
votes
1 answer

97.9 % Code coverage in sonarcloude and error is not covered by test Spring Project Main Application

I am getting 97.9 % code coverage in sonarcloude and i want to make it 100%. Error is showing that my SpringProjectMainApplication.java is not covered by the test. Main Class is : **@SpringBootApplication public class SpringProjectMainApplication { …
2
votes
0 answers

sonarcloud sonar-project.properties to ignore files containing a camel case regular expression

I wanted to ignore camel case regular expression code smell from sonar cloud analysis. I do have sonar-project.properties within my project: sonar.host.url=https://sonarcloud.io sonar.organization=XXXX sonar.projectKey=YYYYY…
saravana kumar
  • 255
  • 1
  • 3
  • 10
2
votes
2 answers

How to configure sonarcloud analysis for Javascript project using Azure DevOps

I am looking for steps to configure sonarcloud analysis for one of our javascript projects, with Azure DevOps as the build platform. The following links have given us some information to start. https://www.npmjs.com/package/sonarqube-scanner
Santhosh
  • 671
  • 12
  • 36
2
votes
1 answer

OpenCover is not uploaded in Azure Devops

I'm trying to hook up my project in sonarcloud. I build and launch my tests using Azure Devops Yaml pipeline. Here is a summary of what's happening. First I have a Prepare analysis task : - task: SonarCloudPrepare@1 displayName: 'Prepare…
Nicolas C
  • 752
  • 5
  • 18
2
votes
0 answers

How do you suppress a code block in SonarCloud to prevent alerting on 'code duplication' in Azure Functions that have to be there?

So in every Azure Function we have that exposes an HTTP trigger at the top of every function we have the same code that validates the JWT for the incoming request. It looks something like this: public static async Task Run(...) { …
Dana Epp
  • 509
  • 1
  • 5
  • 13
2
votes
0 answers

shellcheck on sonarcloud (plugin)

I use ShellCheck in order to validate my bash scripts. I have a project that is made in bash and I want to scan it with ShellCheck in SonarCloud. When I use SonarCloud für analysis it shows The main branch has no lines of code.. Currently, I…
dan1st
  • 12,568
  • 8
  • 34
  • 67
2
votes
0 answers

SonarCloud Integration with Bitbucket not analysing C# files

I have SonarCloud Integration with Bitbucket using Bitbucket pipelines but SonarCloud isn't analysing any of the .CS files. I can see in the SonarCloud dashboard that it can see the files but doesn't analyse them. It does scan some HTML and XML…
Dodgystats
  • 55
  • 6
2
votes
2 answers

SonarCloud shows coverage for test class although test classes are excluded

I have set up SonarCloud analysis for a Java project which triggers analysis when a PR is created on the git repository. The command for triggering the check in my .travis.yml file is: mvn clean compile test…
Abhijeet Vaikar
  • 1,578
  • 4
  • 27
  • 50
2
votes
1 answer

How to import external issues only on SonarCloud

I'm importing swiftLint issues to Sonar using this sonar.swift.swiftLint.reportPaths=swiftlint.json. This doesn't stop Sonar from analysing swift files using SonarSwift. Thus, issues from both the tools get uploaded to SonarCloud. I want Sonar to…