sonarqube , Preview analysis might be impossible if it occurs right after an analysis that was executed on a different timezone


Preview analysis might be impossible if it occurs right after an analysis that was executed on a different timezone

Question:

Tag: sonarqube

Can anyone suggest an effective solution for this: https://jira.codehaus.org/browse/SONAR-5049.

We are a global team working with a Sonar CI server.


Answer:

We are currently working on this, so this limitation will be fixed in upcoming SonarQube 5.1 (ETA end of February 2015) as you can see in the ticket.

Meanwhile, you have a workaround given in the last comment of the ticket.


Related:


SonarQube rules getting disabled on startup


sonarqube
I initially setup a Sonar server on my development machine but later created a server on the official Linux machine, with the intent to stop using the dev one. During this transition i may have had both servers run at the same time (pointing to the same Sonar database). Now...

max_allowed_packet, I don't have MySQL


mysql,sonarqube,sonarqube-5.0
I'm trying to run sonar-runner.bat, when it almost finished analyzing, it's written max_allowed_packet more than something something. So it fails. Through deep search, everyone said that i should configer my.ini file inside MySQL folder. But, I don't have MySQL Installed. Log: Error: unable to execute sonar error: caused by: unable...

Can I get the projects links via the SonarQube Web Service API


sonarqube
We want to get the project links (Home, Continuous integration,...) via the SonarQube Web Service API. The links belong to the CoreProperties - https://github.com/SonarSource/sonarqube/blob/master/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java Is it possible to read them via the API?...

Sonarqube Provide link in widget description


sonarqube
I want to provide the link to my widget's documentation in the description. Right now, I put the link in the @Description annotation and it's shown as plain text. Is there a way to make the link clickable? Maybe a @Link annotation?...

SonarQube 5.1 Adding Custom Rule for java


java,maven,sonarqube,sonarqube-5.0
I have implemented Sonar Java Plug-in(Maven) following the example here : https://github.com/SonarSource/sonar-examples/tree/master/plugins/java-custom-rules. Copied the generated sonar-plugin in /extensions/plugins directory. Restarted the SonarQube server and ran the analysis using the mvn sonar:sonar. I can see the new Rules being added in Rules tab but no issues are being logged and also...

Sonar test coverage does not include indirect classes


java,sonarqube
If I have the below classes (A and B) which are each in a separate module and I create a test for A.doSomething(), Sonar will complain about 0% coverage on B.doSomething() although it is being testing indirectly in TestA. Using Ecclema coverage plugin for eclipse, I can see B.doSomething() is...

TFS with SonarQube, no product projects, only test projects


sonarqube,tfsbuild,tfs2013
I have installed SonarQube on my local development machine by following installation guide: SonarQube Installation Guide for Existing TFS Environment.pdf. The build is succesfull. The project is added to the dashboard. But there was only testcoverage data. I have 4 projects in my solution, 2 of them are unittest projects....

Sonarqube 5.2 / Checkstyle plugin 2.3 : Enabling SummaryJavadocCheck makes the analysis failed


java,sonarqube
I recently change my SONARQUBE configuration: Before: SonarQube 5.1 Java plugin 3.0 PMD plugin 2.3 Checkstyle plugin 2.2 FindBugs plugin 3.2 Issue Assign plugin 1.6 After: SonarQube 5.1 Java plugin 3.3 PMD plugin 2.4.1 Checkstyle plugin 2.3 FindBugs plugin 3.2 Issue Assign plugin 1.6 On new configuration I have enabled...

sonar maven analysis only picks .java file


maven,groovy,sonarqube,sonarqube-5.0
I am trying to run a sonar maven analysis on my multilanguage project which contains many languages like *.java, *.groovy, *.js etc. I have installed all the languages plugin in my sonar and configured my pom sonar.sources parameter as src/main,src/test but still it picks up only java files. In the...

Sonarqube ghost projects in issues


sonarqube,sonar-runner
I am currently configuring a sonarqube instance with version of 5.1 and after several analyzes there are ghost projects appearing in issues tab on main page. Currently there is only one project that is being analyzed with same identifier and when i check database for those projects there is only...

Running SonarQube on internal Web Server


web-services,iis,sonarqube,sonarqube-5.0
I am trying to make Sonarqube working on a virtual machine, IP 192.168.0.150, running on a production server (Win Server 2012 R2). I need also to access it from the Internet. Thus, I created a new website in IIS on the Physical server enabling the reverse proxy and redirecting everything...

SonarQube not running on CentOS


sonarqube,virtual-machine
I'm currently trying to install sonarqube on my VM which runs CentOS. I'm just running ./sonar.sh start or ./sonar.sh console but I get the following error: Spawning intermediate process... Spawning daemon process... --> Wrapper Started as Daemon Using tick timer. server listening on port 32000. Command[0] : /usr/java/jdk1.8.0_40/bin/java Command[1] :...

Pass sonar's PT_RELATIVE_PATH_TRAVERSAL in java


java,sonarqube,path-traversal
I've got two issues sonar is sad about. First one in a line of code with relative path traversal issue which looks like this: File f = new File(MY_DIR + filename); Where filename is a parameter I've got from a request. The second line is about an absolute path traversal...

SonarQube LDAP authentication is not working


authentication,ldap,authorization,sonarqube
Presently, connecting to Apache Directory Server 2.0 from SonarQube 5.0.1. Have given the following entries in sonar.properties file: # LDAP configuration # General Configuration sonar.security.realm=LDAP sonar.security.savePassword=false ldap.url=ldap://10.53.67.11:30389 # User Configuration ldap.user.baseDn=o=TechMahindra ldap.user.request=(&(objectClass=inetOrgPerson)(uid={login})) ldap.user.realNameAttribute=cn ldap.user.emailAttribute=mail # Group Configuration...

Technical debt on custom web rule in sonarqube 5.1


web,annotations,sonarqube,sonar-runner,sonarqube-5.0
I am facing issue in technical debt with custom web rules. I have web plugin but no technical debt is assigned to rules. I want code or annotation through which i can assign some constat/issue value to each rule and can calculate debt from that. I used following anotations while...

Upgrade SonarQube issues


service,jenkins,webserver,sonarqube,sonarqube-5.0
I'm having issues installing my instance of SonarQube 4.4 to 5.1. The instructions say to stop the SonarQube server, match up a couple files (back up DB, copy plugins, etc.), and then restart the sonar server for the updated version. My problem is I'm not sure how to start/stop the...

How do I set task properties in a Gradle Plugin


gradle,sonarqube,sonar-runner,gradle-custom-plugin
I am creating a gradle plugin to apply the sonar-runner plugin and default many of the values such as the sonar host URL and the sonar JDBC URL. I cannot figure out how to set the properties though. When I set this up in build.gradle I use: apply plugin: 'sonar-runner'...

SonarQube Nitpicking? - “Right curly brace and next ”else“, ”catch“ and ”finally“ keywords should be located on the same line”


java,sonarqube
I run popular Java Code Quality tool SonarQube and was observing its suggestions. I see that it reported below issue with 'Major' severity, You could see compliant and non-compliant piece of code for that rule as below, if(something) { executeTask(); } else if (somethingElse) { // **Compliant** doSomethingElse(); } else...

Custom sonar plugin and widget, display the same sonar measure from multiple projects


widget,sonarqube,sonarqube-5.0
I have sonar 5.1 set up with multiple projects lets say project A and project B, and have ran analysis on both. I am able to import my coverage and test result files into both and every thing looks fantastic. What I would like to do is to pull the...

How can I integrate ReSharper's Dotsettings File in SonarQube?


c#,resharper,sonarqube,bamboo,stylecop
I have a C# Project with a ReSharper Dotsettings file. I want to configure Sonar so that it uses my Dotsettings file. In my Dottsettings file i disabled many Rules. How can I integrate this file in SonarQube? This is my sonar-project.properties file (just the ReShaper part): #ReSharper sonar.resharper.mode= sonar.resharper.dotSettings.path=MyProject/ReSharper7-Coding-Style.dotsettings...

Unable to delete the persistit_tempvol file after Executing sonar Embedded Runner from Java


java,out-of-memory,sonarqube,sonar-runner
I have a set of project's on which I need to execute Sonar. Once I execute sonar task and it publishes the result it deletes all the files in the directory .sonartemp except the file persistit_tempvol. This file is locked by Java SE runtime and I am unable to delete...

SonarQube analysis failure after Java Plugin upgrade (3.2 -> 3.3)


java,sonarqube
Today we upgraded SonarQube Java plugin from 3.2 to 3.3 (http://docs.sonarqube.org/display/PLUG/Java+Plugin). Now the analysis end with failure: 13:59:10 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project ingbol: SonarQube is unable to analyze file : '/var/lib/jenkins/workspace/ing_trunk_sonar/sources/cib-actions/src/main/java/com/company/cib/corpo/struts/actions/IngCcsRightsAction.java': org.sonar.java.model.expression.MethodInvocationTreeImpl cannot be cast to...

sonar-maven-plugin 5.1.1 not found


maven,sonarqube
I've just installed the latest version of SonarQube (5.1.1) and when I try to run the sonar:sonar target, I get an error: Embedded error: Unable to build project for plugin 'org.codehaus.sonar:sonar-maven-plugin': POM 'org.codehaus.sonar:sonar-maven-plugin' not found in repository: Unable to download the artifact from any repository org.codehaus.sonar:sonar-maven-plugin:pom:5.1.1 I've checked here: http://mvnrepository.com/artifact/org.codehaus.sonar/sonar-maven-plugin...

How to specify SonarQube rule description as a markdown/html resource file instead of using annotation?


plugins,sonarqube
I have my custom rule, let's say with AEM-1 key. So, as it is done here, I make my AEM-1.html resource file with some simple html content and it does not get's picked up by SonarQube 5.1. It refuses to start, because no description is provided for the rule. I...

Sonarqube can't resolve issue


sonarqube,sonarqube-5.0
I'm using SonarQube 5.1 to analyse a C#/Typescript project. All is working fine, except the issues seem to do what they want. First, I have a much higher number of issues (4000) in the issue search, while the dashboard shows 1700 issues. Furthermore, I can't close many issues, I get...

Send existing LCOV file to SonarQube


javascript,testing,sonarqube,code-coverage
Because of the way my project is built, I can't use SonarQube to run coverage on my project. I have my JavaScript coverage all working with Karma and other tools. These tools output a valid LCOV file. Everything else I've found requires you to have SonarQube run the coverage and...

Working with SonarQube rules


sonarqube
I am new to SonarQube and using SonarQube 5.1. I read from somewhere that it is a replacement for FindBugs and CheckStyle. So does it mean it internally runs FindBugs and CheckStyle? But I counldn't find any FindBugs and CheckStyle plugins inbuilt. From where does Sonar take the rules?

Logging error when executing Maven SonarQube plugin


maven,logging,sonarqube
I've been facing an issue with Maven SonarQube plugin (v2.6) when Maven version is recent (strictly larger than 3.1). Here is what I run: mvn clean verify -Psonar mvn org.codehaus.mojo:sonar-maven-plugin:2.6:sonar -Psonar The first invocation makes sure sources are compiled and JaCoCo agent is prepared. The interesting part comes, when the...

Sonarqube Eclipse plugin not working in incremental analysis mode


sonarqube,sonarqube5.1
I have installed sonareclipse plugin 3.4 in eclipse Juno version. I have set sonar.analysis.mode=incremental in preview analysis properties. But when I analyze the project in eclipse it shows all the issues and not just new issues. SonarQube server version is 5.1. Can you please help me here?...

Analysis fails on SonarQube 4.1 with java.sql.SQLException but succeeds on 4.5


sonarqube,sonarqube-4.0
Running sonar-runner on a sonar-example project against my SonarQube 4.1 instance fails. In the stack trace, I noticed that it gives the following error: Caused by: java.sql.SQLException: Access denied for user 'sonar'@'172.23.48.129' That ip is my local machines IP. My SonarQube server is on a different box. My sonar-runner.properties and...

SonarQube P2 repository has gone forever


eclipse-plugin,sonarqube,p2
Codehaus is shutting down its services, including the Eclipse Plugin of SonarQube. Does anyone know whether there is already a replacement for the P2 repository http://dist.sonar-ide.codehaus.org/eclipse/ ? Thanks...

Multiple inheritance for Quality Profiles


sonarqube
I see a need for multiple inheritance for Quality Profiles to avoid unnecessary manual work when we upgrade. For example we would like to inherit all rules from "Sonar Way" and from "Android Lint" and restore the built-in profiles after each upgrade, making sure we are always up to date....

Build failure due to Sonar plugin


service,jenkins,sonarqube,sonarqube5.1
My build keeps failing on Jenkins because of this error: ERROR: Error during Sonar runner execution org.sonar.runner.impl.RunnerException: Unable to execute Sonar at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91) at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) at java.security.AccessController.doPrivileged(Native Method) at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) at...

Is it possible to see per commit impact in Sonar?


git,continuous-integration,sonarqube,code-quality
I need to see history of commits and how those impacted sonar metrics. Using git. So far I found only SCM stats plugin which doesn't show much. EDIT: I'm looking for a plugin or functionality that will give me a batch impact history, so say I perform Sonar analysis twice,...

CssSquidSensor and JavaScriptSquidSensor both fail with parse errors when Byte Order Marks are present


javascript,c#,css,.net,sonarqube
We are attempting to analyze our .Net projects with SonarQube. These projects contain both CSS and JavaScript in addition to C#. I think we have our projects configured correctly, both the CssSquidSensor and the JavaScriptSquidSensor execute for each project but they fail to parse our css and js files due...

SonarQube 5.0.1 - Error declaring a false-positive issue


sonarqube,sonarqube-5.0,false-positive
I've a "Failed" message displayed when I declare a "false-positive" issue from the Web UI of Sonarqube (5.0.1). A 400 error is returned with this response : "Transition from state RESOLVED does not exist: falsepositive" But the issue is declared "unresolved" in the web ui (both on global issues and...

SonarQube doesn't show any issues with Maven project


java,maven,sonarqube
I was using Sonar two weeks ago and It worked fine. Now, when I run sonar, without having changed the project, it shows me 0 issues, 0% technical debt, etc .. ( 20-30 issues were found two weeks ago and the project didn't have changed) This is the result of...

Single Jenkins instance using multiple Sonar instances


java,jenkins,sonarqube
Is it possible to configure Jenkins to use multiple Sonar instances? Currently we are using one Sonar instance for legacy projects (Java 6) and a new Sonar instance for Java 8...

Does SonarQube count comment blocks in duplicated code?


sonarqube
Simple question. SonarQube has a duplicate code scanner. Does it examine comment blocks in this algorithm? If I have 1000 source files with the same copyright header, will it detect these as duplicated code?

Sonar Runner default logging level


sonarqube
Is it possible to change the default logging level of a sonar runner from INFO to WARN or similar? Our nightly SonarQube analysis is blowing the Team City logs out with huge amounts of entries. According to the source, the logging is standard slf4j but when i've tried to reconfigure...

SonarQube reports no dependencies, 0 Tangle index, for C# solution with 12K+ classes?


c#,sonarqube
We recently setup SonarQube analysis jobs for our main .Net applications, 6 of them totally 4.4 million lines of code and some 35K+ classes between them. We are getting lots of interesting information but the design analysis does not seem to be working at all. The tangle index is zero...

SonarQube analysis reports error “Unable to parse file” for all Python3 source files


maven,python-3.x,sonarqube
Some background: I am using a tiny / dummy pom.xml to facilitate SonarQube analysis for Python3 source code. All Python3 source files are triggering this SonarQube error... Sample error message (with the entire source code of the file): [ERROR] [23:13:30.135] Unable to parse file: /home/kca/saveme2/git/kevinarpe-rambutan3/rambutan3/RTestUtil.py [ERROR] [23:13:30.135] Parse error at...

When a rule parameter is set to an erroneous value, there's no error message when you click on “Activate”


sonarqube
On SonarQube 5.1, when a rule parameter is set to an erroneous value, there's no error message when you click on "Activate" and the rule does not get activated.

Naming convention rules does not seem to properly work when the default regular expression is overridden in SonarQube (Python)


python,sonarqube
Naming convention rules does not seem to properly work when the default regular expression is overridden (Python) ...

Jenkins doesn't refactor folder names, SonarQue gives response


java,git,jenkins,sonarqube
So I am using a continous integration path (IDE -> Github -> Jenkins -> SonarQube) and I had to refactor some package names (the first character was uppercase, not as it should be) to lowercase. However, sonarqube now gets stuck on the foldernames that Jenkins uses. See, I had a...

Upgrade H2 from sonarqube 4.5.1 to 5.1.1


sonarqube,upgrade,h2
Today I have installed Sonarqube 5.1.1. Not having a lot of data/projects I'm using the H2 db embedded in Sonarqube. Following the steps in the Upgrading page of the Sonarqube documentation I have the process up and running but without any data. Copying the \data\es folder from the old installation...

Failed sonar migration because table already exists


sonarqube
I am trying to upgrade Sonarqube from 3.7.4 to 4.5.4 I've updated all the plugins and the new application starts as expected. I then go to the /setup URL where I am prompted to start the DB migration. This fails with the following error: ActiveRecord::JDBCError: Table 'rule_tags' already exists: I've...

How to analyze code from other class than currently analyzed in SonarQube?


java,plugins,sonarqube
Case: I'm writing SonarQube rule that needs to check if manually created object is being closed. When it's not, issue should be raised. Let's assume that part related to determining if object is created manually (or not) is easy and not relevant. For purpose of this example it'll be...

How to exclude a directory from the code analysis?


sonarqube,code-analysis
There have been some questions about this, but none of them solves my problem. I use SonarQube to do code analysis on one of my projects, which contain a Migrations directory. I would like to exclude all the source files in that directory from the code analysis. In the projects...

Relationship between SonarQube Runner and SonarQube.MSBuild.Runner


tfs,msbuild,sonarqube,sonar-runner
Regarding the announcement of SonarQube integration with MSBuild and Team Build, can anyone advise on the relationship between SonarQube Runner and SonarQube.MSBuild.Runner? I'm unclear whether SonarQube.MSBuild.Runner replaces SonarQube Runner or whether it sits on top of it.