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

Is there a way to make Sonarcloud not showing me a specific code smell error?

There's a specific code smell error in sonarcloud which I don't want it to be shown anymore. Is there a way to do it through it's config file (sonar-project.properties)? Or maybe through a github action? thanks in advance! I tried to search anywhere…
Opal Lavi
  • 1
  • 1
0
votes
0 answers

Can you delay the Azure Dev Ops PR email notification to reviewers until after checks have completed?

In DevOps is there a way to delay or even cancel the email that is sent to PR reviewers until after the checks for that PR have been completed? For example if you have a policy that checks for linked work items etc. I don't want to notify the PR…
Martin
  • 587
  • 1
  • 6
  • 18
0
votes
1 answer

SonarCloud API endpoint for getting the total numbers of Unit Tests

Do you know what's the API endpoint needed for me to get the total number of Unit Tests in my SonarCloud? The yellow one is the one that I need to get using an API Endpoint upon digging the documentation it is somewhere in the api/metrics or…
Noob
  • 31
  • 5
0
votes
0 answers

How to make a sonarcloud project with two codebases in one repo

I have a backend .net project and a frontend angular project. Both are in the same repo but are different codebases, mainly because github doesnt support monorepos and we are trying not to have a lot of repositories for one project all scattered. I…
Walde
  • 21
  • 4
0
votes
0 answers

sonarcloud all of a sudden scanning every file

We have been using sonarcloud for around 10 months now with no issues. We use the Github Action called Sonarcloud Github Action within our CICD. On each commit that gets pushed to an open PR, we run this step as such: - name: SonarCloud Scan …
0
votes
0 answers

SonarLint in PhpStorm Not Highlighting Code Conventions Like SonarCloud

I'm using the SonarLint extension for PhpStorm and have successfully connected it to my organization on SonarCloud. However, I've noticed that it's not alerting on code conventions in the same way as SonarCloud does. For instance, when SonarCloud…
jairhumberto
  • 535
  • 1
  • 11
  • 31
0
votes
1 answer

How to obtain the sonar.pullrequest.key dynamically

I am setting PR decoration for my project and I am adding the following configuration in my…
0
votes
0 answers

How can I solve the SonarCloud issues in routes/users.js file of my backend project?

I'm working on this backend and SonarCloud keep telling me that there's 2 issues in the file routes/users.js that I don't know how to remove, could you please help me ? [enter image description here] enter image description here I tried ChatGPT but…
GaivSo
  • 1
0
votes
0 answers

How to integrate a .NET (C#) bitbucket project with SonarCloud to generate the sonarcloud analysis report

I have a .NET project on bitbucket and what to analyze it on SonarCloud. How to integrate the .NET project with sonarcloud to get the analysis report. What are the dependencies which need to be added into the .NET (c#) project to make it visible on…
Samrudhi
  • 3
  • 2
0
votes
0 answers

Add a "return" statement to this callback

I pushed some third party code to our Repo and got this errormessage from Sonar Cloud; "Add a "return" statement to this callback." I added the return statement, but still got the same error. I also tried to replace the comma after the forEach…
0
votes
0 answers

Sonarcloud won't show code coverage (.NET project and Coverlet)

I've got a .NET web application and would like the code coverage (calculated with Coverlet) to be shown in Sonarcloud, triggered by GithubAction. Here's the relevant snippet: sonar-analysis: #name: Build and analyze runs-on: ubuntu-latest …
chDu
  • 1
  • 1
0
votes
1 answer

JaCoCo exclusions are being ignored by Sonar

I use the Gradle JaCoCo plugin, according to the exclusion list some folders must be excluded from the test coverage check. But when I run gradle sonar all these folders are being processed by Sonarcloud. How can I force SonarCloud to ignore these…
0
votes
1 answer

How to setup Sonarcloud with code coverage for a .NET project using Coverlet

I'm trying to setup a pipeline that runs sonarscanner, unit tests with code coverage. I can't figure out why it is not working. I'm getting no errors but in sonarcloud is saying 0 errors and 0% coverage. Coverlet open cover is creating XML file that…
0
votes
1 answer

Setting Rule Parameters such as ignoreFontFamilies

In SonarCloud where/how would I set the parameters for specific rules? For example, more specifically, I am needing to set "ignoreFontFamilies" on the CSS rule "Font declarations should contain at least one generic font family" (rule ID css:S4649)…
Chad Mueller
  • 77
  • 3
  • 10
0
votes
0 answers

Adding SonarCloud test inclusions causes source exclusions

We have a large C# monorepo setup in Azure DevOps. We've set up SonarCloud via their Azure DevOps extension, using the MSBuild flavour of the scanner. We are using their "monorepo" variant, with one SonarCloud project per solution. Since we have…
tsemer
  • 2,959
  • 3
  • 29
  • 26