SonarQube Scanners run the analyzers on code. Use this tag for questions related to any of the scanners: SonarQube Scanner for CLI, Maven, Gradle, Jenkins, etc.
Questions tagged [sonarqube-scan]
1464 questions
13
votes
3 answers
Using waitForQualityGate in a Jenkins declarative pipeline
The following SonarQube (6.3) analysis stage in a declarative pipeline in Jenkins 2.50 is failing with this error in the console log: http://pastebin.com/t2ja23vC. More specifically:
SonarQube installation defined in this job (SonarGate) does not…

Idan Adar
- 44,156
- 13
- 50
- 89
12
votes
2 answers
Unsupported class file major version 55 when executing sonar-maven-plugin under openjdk11
i looked around the similar issues and replies, but did not find the solution for mine.
I am using openjdk11 and apache-maven-3.5.4 for my project compile and package, everything works fine and the application is running normally.
But on my…

Xiaoqiang Wang
- 131
- 1
- 1
- 8
12
votes
2 answers
SonarQube MSBuild Scanner doesn't exclude files from analysis
We are currently using SonarQube Scanner for VSTS/TFS 4.1.1 (which is using SonarQube Scanner 4.1.1).
What we want to do:
For some projects (modules) in our solution we want to exclude files from the analysis and from the code coverage statistics.…

Marcell Spies
- 331
- 3
- 8
12
votes
2 answers
SonarQube error when executing blame for file
I recently upgraded from SonarQube 5.1.2 to SonarQube 5.6. Now I'm getting an IllegalStateException "Error when executing blame for file". This happens building with my ant scripts in both Eclipse and Jenkins. In Jenkins the error is more complete,…

PatrickE
- 389
- 1
- 2
- 11
11
votes
0 answers
Change main branch in Sonarqube without deleting branch
I am trying to change my main branch in Sonarqube from master to mainline as I have been doing my analysis on mainline for the past few months.
This post below in the Sonar community says that I have to delete the mainline branch then rename the…

Zach
- 143
- 1
- 1
- 6
11
votes
1 answer
How to setup sonarqube for Angular 7 project
Trying to setup Sonarqube for Angular 7 code base for code coverage analysis.
I have Installed the Sonarqube and created a project in Admin after getting the Authorization cmd
"sonar-scanner.bat -D"sonar.projectKey=TestApp" -D"sonar.sources=."…

Divya Sharma
- 237
- 1
- 6
- 17
11
votes
2 answers
Sonarqube branch results for long-lived branch not showing as expected
Sonarqube Server Version 7.0 (build 36138)
Sonarqube Branch Plugin 7.0 (build 413)
sonar-maven-plugin:3.4.0.905
Java project
Sonarqube is set up with a master branch already.
As part of a Jenkins build job we execute the following command:
mvn…

Wes Gamble
- 777
- 10
- 29
11
votes
1 answer
How does SonarQube calculate the overall coverage?
The image above shows the SonarQube coverage for one of my folders, but if you take the average of the percentages of all files in that folder, it will amount to 49%, yet SonarQube will display 31.4%. If not by taking averages, how does SonarQube…

m-a-r-c-e-l-i-n-o
- 2,622
- 18
- 26
11
votes
0 answers
sonarqube scanner downloads all the plugins
I have a very simple sonar-scanner.properties file. This is how it looks…

Asdfg
- 11,362
- 24
- 98
- 175
11
votes
4 answers
SonarQube upgrade from 6.4 to 6.5 breaks the scanner
I am on sonarQube6.4 and have upgraded to 6.5
Sonar-scanner is 3.0.3
Now after the upgrade the scanner fails anytime there is a java file in the source path. If I don't scan java files everything works just fine.
However If I rollback an use 6.4…

Prashant Saddi
- 111
- 1
- 1
- 3
11
votes
5 answers
SonarQube analysis could not be completed because the analysis configuration file could not be found
SonarQube is giving me below error when i integrate the xamarin app with jenkins on windows sever
SonarQube Scanner for MSBuild 3.0
Default properties file was found at C:\SonarQube\bin\SonarQube.Analysis.xml
Loading analysis properties from…

vinay
- 1,276
- 3
- 20
- 34
11
votes
2 answers
Project with both java and javascript in sonarqube using gradle
We have a pretty standard web project using Java, which contains also some javascript code in the standard src/main/webapp folder. We are using Gradle 2.14 as our build tool.
We have just installed a brand new Sonarqube 6.0.1 on a fresh server,…

Andrea Bergia
- 5,502
- 1
- 23
- 38
11
votes
2 answers
Automatically derive mandatory SonarQube properties from pom file in Jenkins
Situation:
I want to analyze my project with SonarQube (5.4) triggered by Jenkins (1.642.4). It is a java project build with maven.
I see two ways to trigger the analysis:
Post Build Action "SonarQube analysis with maven" but it's deprecated, so I…

Sergej Werfel
- 1,335
- 2
- 14
- 25
10
votes
2 answers
SonarQube: How to suppress a warning in Kotlin code
I'm using SQ 7.3-alpha1 with sonar-kotlin-plugin-1.0.1.965.jar. However, I cannot deactivate a special warning inside my Kotlin code for repositories in Spring Data where I need an "_" in a method name.
I tried both //NOSONAR and…

Juergen Zimmermann
- 2,084
- 7
- 29
- 43
10
votes
5 answers
dotnet.exe locking SonarScanner.MSBuild.Common.dll
Good evening,
I am using the .Net Core 2.0 version from here https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner+for+MSBuild on a 2.1 project in Jenkins with:
withSonarQubeEnv('SonarQubeMain') {
bat "dotnet…

Nauzet
- 661
- 8
- 20