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

Trying to exclude all files in a directory from DevOps to SonarCloud Fails

I can't figure out what is wrong with this task in DevOps to exclude all files in the path: **.AdminCenter/companyname.AdminCenter.FrontEnd/xyz/lib - task: SonarCloudPrepare@1 inputs: SonarCloud: 'SonarCloudTokenDigitalisering' …
Peter
  • 489
  • 3
  • 16
0
votes
0 answers

Sonar Cloud Gitlab Analyzes

I use Sonar Cloud to analyze my code with Gitlab CI. How it is usually in the SONAR_HOST_URL I put https://sonarcloud.io , but after the pipeline finish sonar put my analysis into INFO: ANALYSIS SUCCESSFUL, you can browse…
user13821287
0
votes
1 answer

SonarCloud and specific rules for NodeJS project within repository code

I have standard company Quality Profile for NodeJS TypeScript projects in SonarCloud. Now to create specific ruleset overwriting some or adding/removing we can use inheritance, create other profile with parent to the other one. Question is if we can…
0
votes
1 answer

How to exclude test classes form Coverage Analysis using Jacoco

I have some test to check my code. I have generated my report in sonarcloud but I have a problem: The coverage percentage takes into account also the test classes, that are obviously uncovered by other test. Is there any option just to take into…
0
votes
1 answer

Is there any SonarCloud API that can retrieve historical trend of issue by severity?

I am looking to retrieve SonarCloud historical trend data of Vulnerabilities, Bugs and Security Hotspot with Severity of BLOCKER and CRITICAL only. I have used this API…
rick
  • 423
  • 6
  • 17
0
votes
0 answers

Unexpected symbol: ‘2e4ce68d4e3feec97e992821e6391166943f4d49’

I tried to built github .yml file but I’m getting error like |GitHub Actions/ Main Workflow Invalid workflow file The workflow is not valid. .github/workflows/build.yml (Line: 22, Col: 22): Unexpected symbol: ''. Located at position 9…
Maximious
  • 155
  • 2
  • 12
0
votes
2 answers

SonarCloud raising a "Blocker" on Springboot's contextLoads unit test

When building Springboot's application and providing Sonar Report a code smell tagged as "Blocker" is raised on Springboot default unit test that evaluates the context load: package nz.co.datacom.oi.processor; import org.junit.Test; import…
rod.dinis
  • 1,233
  • 2
  • 11
  • 20
0
votes
1 answer

Azure DevOps with SonarCloud not finding tests

I'm using SonarCloud with AzureDevops. The sequence in my YAML file is: Restore NuGet Sonar Prepare Build solution Run tests Sonar Analyze Sonar Publish I don't specify any output locations (at least, not knowingly). When the tests run, I get the…
DrGriff
  • 4,394
  • 9
  • 43
  • 92
0
votes
1 answer

SonarCloud - No scan results appearing for Javascript for maven / bitbucket project

I might be missing something obvious, but I can't seem to get scan results for javascript to appear in SonarCloud. The repository is 95% an angular app with 5% java code. The java code scan is appearing in SonarCloud, but really I only need to scan…
Tony Brasunas
  • 4,012
  • 3
  • 39
  • 51
0
votes
1 answer

Ensure regular expression is performant and secure

I crafted two regular expressions that successfully parse the strings I desire parsed. However, when running the code that includes the regular expressions against Sonar Cloud (quality and security check), I get a warning about performance and…
0
votes
1 answer

SonarCloud .NET Core coverage is very strict. Is there any way to change this?

So we use SonarCloud for a .NET Core MVC project in an Azure DevOps pipeline. We noticed we have very low code coverage according to SonarCloud (< 50%) while we have a lot of unit tests. Our organization has no minimum code coverage rules or…
Martijn
  • 739
  • 9
  • 26
0
votes
1 answer

Questions about egit and github/travis

i'm a beginner java developer, i need to use eclipse and i have some questions about eclipse/github/egit/jgit/travis. I need to get the commits made on a repository in github. I found on the internet that this is possible with both jgit and egit…
fabianod
  • 501
  • 4
  • 17
0
votes
2 answers

null check in try-with-resources

I've got the following code: try (Connection connection = getConnection(); PreparedStatement preparedStatement = connection.prepareStatement(someSql)) {//stuff} How do I check that connection is not null here? Also, I got a method which…
0
votes
1 answer

SonarCloud error from CircleCI: Please check the properties sonar.login and sonar.password

I'm trying to get SonarCloud.io to work with CircleCI. I have a working CircleCI config (except for the SonarCloud bit) and have followed the setup instructions in SonarCloud. My CircleCI config.yml looks like this: version: 2.1 orbs: sonarcloud:…
Paul Grenyer
  • 1,713
  • 3
  • 30
  • 51
0
votes
1 answer

Sonarcloud Cannot Analyse PR Even Though Main Branch is Analysed

I have a multi-module Maven-based Java project. Experimenting on CI, I use Github Actions to automatically perform run unit tests and code quality scan on SonarCloud. Running unit test and code quality scan to SonarCloud locally works fine. However,…
user8152821
  • 157
  • 2
  • 10