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
3
votes
0 answers

Integration test code coverage report for Go lang project in SonarQube

Installed cover tool with following command: go get golang.org/x/tools/cmd/cover I'm able to run unit test and update the test and coverage result in Sonar with following config and method (all test are present in project root directory) : Run test:…
Shiva
  • 717
  • 9
  • 22
3
votes
2 answers

SonarCloud requiring code coverage for files ignored with Istanbul

I have a JavaScript app where we generate a code coverage report using Istanbul and use SonarCloud for static analysis. There are two ways we exclude code from the Istanbul. The first is to set exclusion paths. In jest.config.js we have this to…
JamesFaix
  • 8,050
  • 9
  • 37
  • 73
3
votes
1 answer

Sonarcloud alerts "not enough arguments" when logging exceptions using SLF4J

I manage an open source project in Java and have about 20 places in my code where I log exceptions using the following pattern (slf4j version 1.7.30) private static final Logger logger = LoggerFactory.getLogger(); ... try { interfaces =…
Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63
3
votes
1 answer

Authorization error when using Sonarcloud on Travis CI

I am trying to use SonarCloud with Travis-CI and getting the following error: * What went wrong: Execution failed for task ':sonarqube'. You're only authorized to execute a local (preview) SonarQube analysis without pushing the results to the…
Shashi Deshetti
  • 1,354
  • 2
  • 11
  • 22
3
votes
1 answer

Sonarcloud is not authorized using Travis CI and Maven

I have an experimental project on my Github used for the practising the CI service integrations. I struggle with using Sonarcloud. I have followed both Tavis CI + Sonarcloud tutorial and Maven example. Mz first confusion starts with the token and…
Nikolas Charalambidis
  • 40,893
  • 16
  • 117
  • 183
3
votes
2 answers

sonar cloud plugin fails on missing class

I have an public project on github. i try to attach sonarcloud to it: ./mvnw -X clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=xxxx-github…
piotrek
  • 13,982
  • 13
  • 79
  • 165
2
votes
1 answer

SonarCloud Code Coverage doesn't work with Github Action

I tried to pass my code coverage report generated by cypress tests with Github Action, but it arrives at SonarCloud with 0% coverage. In my pipeline, i get the following warn: WARN: Could not resolve 7 file paths in…
2
votes
0 answers

Sonarcloud + Gitlab import project API?

I am using Sonarcloud and the gitlab integration they offer. In the UI (at the https://sonarcloud.io/projects/create url), they have a screen that looks like this (see screenshot) that allows the user to import a gitlab project from the gitlab…
Tim Estes
  • 377
  • 2
  • 19
2
votes
0 answers

SonarScanner CLI error: check sonar.projectKey and sonar.organization properties, SONAR_TOKEN variable

When using SonarScanner, following the suggested manual recipe for classic .NET and MSBuild - so all required properties and variable are passed to the CLI tool - I find the following error at the bottom lines: ERROR: Project not found. Please check…
2
votes
1 answer

SonarCloud Could not import unit test report TRX Unrecognized root element

I'm new to testing and i'm trying to run my unit tests and coverage for .NET in Azure Pipelines and send it to SonarCloud. When i run my unit tests using VSTest I get the TRX file, and .coverage file. I'm using ReportGenerator to transform the…
wolfdebs
  • 153
  • 7
2
votes
2 answers

How to send .coverage file to SonarCloud

i'm new to sonar cloud and my company implmented it in AzureDevOps Pipeline. The problem we are facing is that, to know our code coverage we have to create a pull request and build the solution in devops for the code to get analysed. So i'm trying…
Miguel Vale
  • 59
  • 11
2
votes
1 answer

Error: Exception in thread "Daemon health stats" java.lang.OutOfMemoryError: Java heap space

SonarQube is failing with a Java Heap Size Out of Memory Task :sonarqube FAILED :sonarqube (Thread[Daemon worker,5,main]) completed. Took 3 mins 49.576 secs. What went wrong: Execution failed for task ':sonarqube'. Java heap space I have added…
Frederic
  • 2,015
  • 4
  • 20
  • 37
2
votes
0 answers

How to run Coverage on SonarCloud using Maven Dependency instead of Source Code

I'm writing some Test Cases for Apache JCS. For University purposes i need to integrate these tests with Maven and SonarCloud, in particular i need to run tests without having in local the JCS source code, but "importing" the project via Maven…
sixpain
  • 342
  • 1
  • 5
  • 13
2
votes
1 answer

SonarScanner for .NET fails in GitHub Actions (.NET 5)

I'm trying to use SonarCloud in my GitHub Actions builds to analyze my code and to produce code coverage for my unit tests. I'm working on a .NET 5 solution in Visual Studio 2019. At first, I was trying the SonarCloud GitHub action…
ngruson
  • 1,176
  • 1
  • 13
  • 25
2
votes
1 answer

How to get Jest to have coverage for export only lines?

I have an index.ts top file in an NPM library which has only export statements. i.e.: export * from "./foo" export * from "./bar" SonarCloud is showing those lines as not covered, as it is expected that those should have no tests. I know we can…
Felipe Plets
  • 7,230
  • 3
  • 36
  • 60
1 2
3
15 16