Questions tagged [sonarqube]

SonarQube is the open source platform, to continuously inspect code quality of applications. It allows developers to detect bugs and vulnerabilities as well as to decrease code smells or bad practices, in more than 20 different languages.

SonarQube was formerly known as Sonar.

SonarQube is the open source platform, to continuously inspect code quality of applications.

It allows developers to detect bugs and vulnerabilities as well as to decrease code smells, in more than 20 different languages.

Feature overview

  • Fully supports the Leak concept to make sure that the code quality of an application gets only better and better as code is added or updated over time
  • Available for more than 20 languages (including Java, C#, C/C++, Cobol, PL/SQL, ABAP, Javascript, PHP, Web, XML)
  • Built-in components for an easy integration (Maven, Ant, SVN, Git, JIRA, Mantis, Google Analytics, Redmine, Jenkins)

Resources

Tutorials & Examples

Books

11817 questions
41
votes
1 answer

How to change the format of the LCOV report executed by Karma?

I've configured Karma to report the coverage of my JavaScript code. Here is the part of the configuration in the karma.conf.js file: coverageReporter: { reporters: [ { type: 'html', dir: 'build/karma/coverage' }, { …
Romain Linsolas
  • 79,475
  • 49
  • 202
  • 273
41
votes
7 answers

Disable rule in sonar

I want to disable a rule from Sonar so it doesn't show the results in the web page. In my case I want to hide (or not capture) the results about trailing comments. Is it posible to configure it somewhere? Thanks.
maqjav
  • 2,310
  • 3
  • 23
  • 35
38
votes
1 answer

SonarQube Runner vs Scanner

What is the difference btw Sonar Runner and Sonar Scanner?. And which version of "Sonarqube" and Sonar runner is required for JDK7?
devinabagre
  • 381
  • 1
  • 3
  • 3
38
votes
1 answer

Do I need sonar and sonar runner for Jenkins?

I want to set up Sonar with Jenkins. But I'm not sure if the Sonar site describes two different ways to do this or if there are two necessary steps: As far as I understood it, it's two different ways. If this is the case, what is the difference and…
user1338413
  • 2,471
  • 8
  • 29
  • 36
37
votes
4 answers

The following projects do not have a valid ProjectGuid and were not built using a valid solution (.sln) thus will be skipped from analysis

When you are building a dotnet core project with SonarQube you may be facing the error in the log: WARNING: The following projects do not have a valid ProjectGuid and were not built using a valid solution (.sln) thus will be skipped from…
Daniel
  • 9,491
  • 12
  • 50
  • 66
35
votes
8 answers

Error in sonar startup, Unable to start JVM: No such file or directory (2)

I am facing strange issue with sonarqube 5.0.1 , one one of the machine it is not starting. Here is the error log - sonar.log - --> Wrapper Started as Daemon Launching a JVM... Unable to start JVM: No such file or directory (2) JVM exited while…
Rishi
  • 5,869
  • 7
  • 34
  • 45
34
votes
11 answers

Sonarqube scan error with line out of range?

[07:43:57]W: [Step 1/1] ERROR: Error during SonarQube Scanner execution [07:43:57]W: [Step 1/1] ERROR: Line 523 is out of range in the file src/main/java/com/company/package/File.java (lines: 522) For some reason Sonarqube is reporting an…
Ro.
  • 1,357
  • 4
  • 13
  • 25
34
votes
4 answers

Sonar : Replace this lambda with a method reference

This code sample Collection values = transform( getValuatedObjects(), input -> getValueProvider().apply(input).getValue()); violates the Sonarqube rule: Lambdas should be replaced with method references Is it a sonar…
gontard
  • 28,720
  • 11
  • 94
  • 117
33
votes
5 answers

maven connecting to Sonar

I have maven installed on my local machine and I'm trying to test out Sonar installed on a remote box. I found a few post online to configure settings.xml (maven\config\settings.xml) and append a profile entry...which I did but does not…
Damian
  • 339
  • 1
  • 3
  • 4
33
votes
4 answers

Sonarqube is not showing code coverage after running

I'm running sonarqube with maven. I have installed it using following way. Using brew, I installed mysql and sonar. When I run I get 7 critical bugs but the code coverage for 88 tests is zero When I run it with IntelliJ's tools, I get the…
Tarun Maganti
  • 3,076
  • 2
  • 35
  • 64
33
votes
2 answers

What does the "leak period" mean in sonarQube?

I'm new in SonarQube I started reading documentation but a lot of time a found "The leak period" but I didn't found anything about it can someone explain me what it means.
e2rabi
  • 4,728
  • 9
  • 42
  • 69
33
votes
13 answers

Stop sonar on window 64

I use sonarqube 4.3 and I can't find a script to stop sonar in windowsx86-64. It's awkward to have StartSonar.batand nothing to stop. When I use it on in linux-x86-64 I can use ./sonar.sh stop. I saw that there was a StartNTService.bat and a…
Michael Courcy
  • 627
  • 2
  • 6
  • 13
33
votes
10 answers

How to recover admin password for SonarQube

I forgot the admin password for SonarQube. Googled and found that the value for crypted_password should be updated to 8b1254c1c684c5dc904f3f174cea1cacbde4ad84 which will reset the password to admin. But still I am not able to login. Any advice?
Sivakumar
  • 361
  • 1
  • 4
  • 5
32
votes
2 answers

Sonarqube, "String contains no format specifiers" when logging constant String message

SonarQube complains about "String contains no format specifiers." when using org.slf4j.Logger, in particular method "public void debug(String msg)". For example log.info("message"); It refers to this rule :…
Jonathan Schoreels
  • 1,660
  • 1
  • 12
  • 20
32
votes
6 answers

How to make Sonarqube exclude a .NET (C#) project from coverage measures

Sonarqube allows for individual files to be excluded from code coverage by adding patterns in the sonar.coverage.exclusions key. This can be done on a project level by adding them in the UI and even in a .csproj file by specifying a SonarQubeSetting…
mvandevy
  • 421
  • 1
  • 5
  • 4