Questions tagged [sonarqube-web]

232 questions
22
votes
2 answers

Duplicated block of Code in Sonar for import statements in Java

In Sonar 4.5.6 (with default settings) I am seeing Duplicated Blocks message as My java code for which I am getting the message is like below:- package com.jabong.orchestratorservice.adapter.order.endpoints; import…
tuk
  • 5,941
  • 14
  • 79
  • 162
18
votes
1 answer

SonarQube: Qualify Cognitive Complexity

I understand what cognitive complexity is and how it will be calculated, but i don't now how to determine what is a good value for that measure, so how complex my code schouldn't be. I need an objective way to estimate it without to compare project…
Pixel-Killer
  • 241
  • 1
  • 3
  • 10
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…
9
votes
1 answer

SonarQube 6.1: How can I see the changes over time without the dashboards?

SonarQube used to have dashboards which were quite convenient to display how metrics changed over time. There was even a dashboard called "Time Machine". How can I see this sort of information in SonarQube 6.1? I appreciate the new focus on the…
Stefan Egli
  • 17,398
  • 3
  • 54
  • 75
9
votes
2 answers

sonarqube missing project dashboard

I have SonarQube 6.1. When I click on a project entry from the main dashboards projects widget, I get to a project home page where it says "quality gate passed" and where some issues are listed ('Bugs', 'Vulnerabilities', 'Code smells' and…
Jens Mander
  • 430
  • 7
  • 15
8
votes
2 answers

All quality profiles have no rules when SonarQube is upgraded to 5.4

We are currently running a production server at version 5.1.2 which we are planning to upgrade. Tests have shown that upgrading to 5.3 works as expected. However, upgrading from 5.1.2 -> 5.4 or 5.1.2 -> 5.3 -> 5.4 results in all quality profiles…
playtime222
  • 99
  • 1
  • 8
7
votes
2 answers

SonarQube is adding duplications when code is repeated in other projects besides the one under analysis

I have a set of projects the have lot of code in common. SonarQube displays a high percentage of duplication. When I go to see the duplication per file, the references on the duplicated code point to the other projects code where the code is the…
Ovidio Pozo
  • 71
  • 1
  • 1
  • 3
6
votes
2 answers

viewing sonarqube duplicate code

In sonarqube 5.6.4, how do I view the duplicate code blocks? In 4.5, there was a mostly hidden UI element under the duplication metric. Now it does nothing. Since the issue is attached to a top of the file, how can I tell what I need to fix?
bkilgore
  • 129
  • 1
  • 7
5
votes
2 answers

Sonarqube Custom Rule- String Literal should not be duplicated, ignored in context of logger

Trying to extend the below linked Sonarqube rule to ignore the occurrence of a string literal in a logger method. I am having issues trying to extract method names for methods (which in the context of the Base Visitor Tree may not be scoped as…
Jordan Smith
  • 107
  • 12
5
votes
1 answer

SonarQube 6.0 get code coverage for a specific version of a project

I am trying to write a tiny script that Gets the versions of all microserves that are in a particular environment (solved) For each project/version gets the sonarqube code coverage for that exact version. I am having problems getting sonarqube…
compiledweird
  • 918
  • 2
  • 12
  • 30
5
votes
2 answers

SonarQube Build Breaker plugin: Report processing did not complete successfully: FAILED

I am trying to upload reports generated by Istanbul to Sonar dashboard using a gulp task and it fails with the below error. Looks like the Build Breaker plugin in SonarQube is timing out before it can upload the report to Sonar. Any way that i can…
joy779
  • 61
  • 1
  • 2
5
votes
2 answers

SonarQube Not Starting when connecting to MySQL

If I don't connect the MySql database to Sonar, the web UI can load no problem on localhost:9000. If I update the configuration file for MySQL, the web won't start, but I can't see a hint from the log. sonar.properties: # User credentials. #…
Mark D
  • 163
  • 1
  • 15
4
votes
2 answers

How to exclude directory from SonarQube analysis?

I am running Spring Boot project which I want to analyze with SonarQube. in a ~/static/~ folder I have libs (boostrap and JS) that I want to exclude from analyze. I have tried both ways: Setting up project-sonar.properties file with…
Pavel
  • 105
  • 1
  • 1
  • 9
4
votes
3 answers

How to extract or export rules from SonarQube

Appriciate if I can get help for the below scenario. My issues to identify how to extract/export all java rules on SonarQube 4.5.7. I tried the below two API calls but I get a "The page you were looking for doesn't exist". The sonarqube version I…
shavantha
  • 361
  • 1
  • 2
  • 13
4
votes
1 answer

Exclude methods in Sonarqube

Is there a way to exclude specific methods in classes when analyzing with sonarqube? All I find is how to exclude files and modules.
heldt
  • 4,166
  • 7
  • 39
  • 67
1
2 3
15 16