Questions tagged [sonarqube-scan]

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.

1464 questions
4
votes
2 answers

Jenkins Pipeline Error : java.lang.NoSuchMethodError: No such DSL method 'withSonarQubeEnv' found

I am using a declarative jenkins pipeline and trying to integrate sonarqube step. However, when I am running the build I am getting "java.lang.NoSuchMethodError: No such DSL method 'withSonarQubeEnv' found" error. Complete stack trace is :…
Manu
  • 173
  • 2
  • 10
4
votes
0 answers

SonarQube - File not found warning

Im using sonarqube to run sonar code analysis on my gradle java project. The sonarqube gradle properties setup: properties { property("sonar.projectKey", rootProject.name) property("sonar.projectName", rootProject.name) …
4
votes
1 answer

Why is Sonarqube telling me await is redundant in async function

I have an error in SonarQueb that says Refactor this redundant 'await' on a non-promise. Below is my JS code. Is the await really redundant? What would be the 'correct' non-redundant code (that keeps the same functionality)? Just remove…
user1142130
  • 1,617
  • 3
  • 20
  • 34
4
votes
1 answer

Why does SonarQube find this issue (() uses a Side Effect Constructor) with case and object class files?

When running a SonarQube scan all case class and object scala files are flagged with a weird issue: Method com.org.package.ExampleCaseClass$.() uses a Side Effect Constructor If I convert it to a normal class the issue goes…
4
votes
1 answer

SonarQube Scanner: are binaries really needed?

I'm running SonarQube scanner on a java project. In the properties file there's a property sonar.java.binaries=**/classes to specify classes location for the projects. The scan failed showing this error: ERROR: Error during SonarQube Scanner…
anto
  • 55
  • 1
  • 3
4
votes
1 answer

code coverage shows zero percentage - SonarQube

We are using SonarQube 6.4 Code coverage for both front end code(JavaScript) & back end code(java) shows 0% Developers claim they have unit test cases for every function or class they write This application has database layer What does code…
overexchange
  • 15,768
  • 30
  • 152
  • 347
4
votes
1 answer

SonarQube - JS Dependencies Security Vulnerability Scanning

I have a large project which includes a front end portion downloading dependencies through NPM/Yarn and was looking for security vulnerability scanning for these third party dependencies defined in package.json. I am already aware of options such as…
4
votes
2 answers

Sonarqube v.4.3.0 VSTS task “Publish Analysis Result” throw error “Could not fetch metrics” (404)

Since the update from 4.2.0 to 4.3.0, publishing the sonar qube results fail with this error for my react application: 2018-06-18T07:35:56.8644128Z ##[section]Starting: Publish Quality Gate Result 2018-06-18T07:35:56.8648466Z…
martinoss
  • 5,268
  • 2
  • 45
  • 53
4
votes
0 answers

Sonarqube: unable to find valid certification path to requested target

We use Sonarqube as docker container (sonarqube:7.1-alpine). As authentification we use GitLab. The SSL proxy is NGinx with Let's Encrypt certificates). This conbination worked weel till last week. Now we get error, if we want to login (see below).…
WebDucer
  • 1,114
  • 2
  • 16
  • 39
4
votes
1 answer

Jenkins : How to get sonar environment variables

How to get sonar environment variables like sonar host, sonar project key or sonar workspace in order to use them in email with Jenkins plugin: Editable Email Notification. any help or idea ?
user6830821
4
votes
0 answers

Jenkins Sonar Scanner "Load Active Rules" sometimes takes 40 minutes

I have jenkins Job which use Sonar Plugin to execute sonar scanning and analysis. There is a step in the execution which is termed as "load Active Rules". This step sometimes takes 2 minutes to complete, and sometimes it takes upto 40 minutes. The…
Amit Kumar
  • 61
  • 2
4
votes
1 answer

Upsource and SonarQube

Has anyone managed to get SonarQube working with Upsource? I have downloaded the upsource-sonar-plugin-0.1-SNAPSHOT.jar plugin for SonarQube and set the following in my SonarQube setting file that I add via the /s switch
Tanzy
  • 650
  • 5
  • 30
4
votes
1 answer

Disable SonarQube plugin for specific projects

Cut to the chase : I think I need to disable SonarQube Github Plugin from the sonarqube server for specific projects if I want to do both of the following : Publish to sonarqube server & report to github using github plugin. It is my understanding…
Gyuhyeon Lee
  • 878
  • 1
  • 9
  • 20
4
votes
2 answers

Sonarqube + Jacoco - sonar does not read report path from properties

Sonar scanner - 3.1 Java 1.7 I'm trying to configure sonar properties to get coverage from a multi-module project. Coverage is generated under the path: Module/build/jacoco/test.exec, so I wanted to add it to sonar.properties file according to…
Lobo
  • 183
  • 1
  • 2
  • 8
4
votes
2 answers

SonarQube Jenkins/git integration when cloning to a subdirectory

I have Jenkins' git plug-in clone my repository to a subdirectory of WORKSPACE. Accordingly, I set sonar.sources=my/subdir SCM detection doesn't seem to be informed by the above setting, however; and setting sonar.scm.provider=git …yields: ERROR:…
Braden
  • 1,448
  • 10
  • 11