Menu
  • HOME
  • TAGS

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

python,sonarqube

I can't reproduce this problem. The only idea is that you have put by mistake a whitespace in the beginning of regular expression " ^[A-Z]...".

Scanning Ruby on Rails Projects with SonarQube

ruby-on-rails,ruby,ruby-on-rails-4,sonarqube

SonarQube has dropped support for Ruby. If you want to supply code styles check for your application, you take a look into following links: Ruby Style Guide. RuboCop - Ruby static code analyzer. Out of the box it will enforce many of the guidelines outlined in the community rails-style-guide. Very...

Send existing LCOV file to SonarQube

javascript,testing,sonarqube,code-coverage

Not sure to understand the question, but if it is how to feed SonarQube with the LCOV report, so you just need to provide the path - absolute or relative to the project base directory - to the LCOV report via the project property "sonar.javascript.lcov.reportPath". See http://docs.sonarqube.org/display/PLUG/JavaScript+Plugin "Code Coverage" paragraph....

Sonar Equals Avoid Null Violation

java,sonarqube

The warning is telling you that it's not sure that title won't be null. A literal, however, such as your empty string, can never be null by definition. And since equals can handle null as an argument you're avoiding a potential NullPointerException by writing <literal>.equals(<somebject>). If you're not using title...

Is it always safe to define sonar.forceAnalysis=true for SonarQube analysis?

sonarqube,sonar-runner

This property is deprecated since SonarQube 3.5 and no longer necessary. See http://docs.sonarqube.org/display/SONAR/Frequently+Asked+Questions#FrequentlyAskedQuestions-Failedtoanalyseaprojectasanotheranalysisonthesameprojectseemstoberunningatthesametime(SonarQube3.4only)

JaCoCo SonarQube incompatible version 1007

sonarqube,jacoco

As already mentioned, this is due to a break in JaCoCo maven plugin code. You can (temporarily) specify the version in your jenkins maven command like: clean org.jacoco:jacoco-maven-plugin:<version>:prepare-agent install e.g. clean org.jacoco:jacoco-maven-plugin:0.7.4.201502262128:prepare-agent install This was the workaround that helped us. But like most people, I'm still waiting for the fix...

Sonarqube ghost projects in issues

sonarqube,sonar-runner

If these are showing up on issues tab only, it seems like an issue with indexing, somehow the search index seems to be corrupted. You can try to delete the ES index and see if it fixes the issue for you. The ES index is stored in <sonar-install-dir>/data/es folder.

Sonarqube Javascript rule “Function names should comply with a naming convention” doesn't work with functions declared in variables

javascript,sonarqube

This particular Sonarqube rule uses a regular expression to check the function name. By default it uses this expression: ^[a-z][a-zA-Z0-9]*$ The function name in your question matches this regular expression. If you want to check other things, you can alter the default regular expression yourself. (You probably have to log...

Jenkins doesn't refactor folder names, SonarQue gives response

java,git,jenkins,sonarqube

This is a common problem on case-sensitive filesystems. Rename the folder to something else, commit that, then rename it to what you want. e.g DataStorageLayer -> dataStorageLayer0tmp -> dataStorageLayer You should be able to do this now, even after the existing failed renaming. By the way, if these are java...

Sonarqube 5.1 TFS sonar msbuild runner with branches

visual-studio-2013,tfs,sonarqube

Indeed Wangen, I do confirm that the MSBuild Runner 0.9 doesn't yet provide a way to inject some SonarQube properties and so including the "sonar.branch" property. This limitation is going to be dropped in version 1.0 of the MSBuild Runner. Nevertheless, you must be aware that the support of branches...

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

plugins,sonarqube

The naming convention is org/sonar/l10n/{plugin key}_{language}/rules/{repository key}/{rule key}.html. It was documented in http://docs.sonarqube.org/display/DEV/Internationalization at the time rule descriptions supported localization. That's not the case anymore since version 4.2, but these HTML bundles are still supported. The correct way since version 4.3 is to use the low-level API org.sonar.api.server.rule.RulesDefinition. It allows...

How can analyze single file in sonar eclipse plugin?

eclipse,eclipse-plugin,sonarqube

It's the other way round. Instead of specifying which file to analyse, you can exclude unwanted files/folders using various configurations available in SonarQube. Details available here: http://docs.sonarqube.org/display/SONAR/Analysis+Parameters...

SONAR in Jenkins - “can't find \bin\java.exe” (2015)

jenkins,sonarqube,jenkins-plugins

At the job configuration level do you have the option of multiple JDK's? If it's set to default, change it to JDK7

Failed sonar migration because table already exists

sonarqube

The table rule_tags is created in version 4.2. So if it's still present when restoring your mysql backup, that means that you restored only data but not structure. Double check your command-line to restore mysql schema.

sonar maven analysis only picks .java file

maven,groovy,sonarqube,sonarqube-5.0

Since it was a multi module project, I had to include the properties sonar.sources and sonar.tests in all the module's pom.xml file. <properties> <sonar.sources>src/main</sonar.sources> <sonar.tests>src/test</sonar.tests> </properties> ...

Does SonarQube count comment blocks in duplicated code?

sonarqube

From the SonarQube documentation on duplications: SonarQube allows to detect "Type 2" duplications which means : structurally/syntactically identical fragments except for variations in literals and comments. So your copyright header will not be counted as duplication....

SonarQube web server goes down after three days

timeout,webserver,sonarqube,offline

I found my mistake: I start MySQL and SonarQube as a service with the task scheduler every time I restart my computer. Under "Settings" is one default setting called "Stop the task if it runs longer than: 3days". I disabled this option. Consequently the services should run all the time...

SonarQube - Unable to load the Wrapper's native library 'wrapper.dll'

sonarqube,sonarqube-5.0

Not all applications use JAVA_HOME variable, so you can have JAVA_HOME pointing on your 64 bits version while you are using a 32 bits. Note: the 'Java_Home' key in the registry is not the JAVA_HOME variable. Well, one way to be sure is to uninstall the current service, with ..\windows-x86-64\UninstallNTService.bat...

Sonarqube can't resolve issue

sonarqube,sonarqube-5.0

It seems that the ElasticSearch index of issues is out of sync. This should be fixed by stopping the server, removing the $SQ_HOME/data/es folder and restarting the server.

Sonar not start After Installtion

sonarqube,sonarqube-4.5

Very probably the user account cofigured in sonar.properties has not eanugh rights to alter database schema. Try with another user or grant sonar more rights. GRANT ALL ON *.* TO 'sonar'@'%'; ...

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

sonarqube

This is not possible yet. But with the UI refactoring that is currently done on 5.2, this is likely that such a WS will be developed.

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

widget,sonarqube,sonarqube-5.0

Do you really want to create a custom plugin for this? You can display metrics over multiple projects with SonarQube widgets. Create a new Measure Filter Select components "Projects" Click on "Change columns" Select the metrics you want to see (in your case lines_covered) and click on "Close" Save the...

How to reuse fxcop.xml in SonarQube

jenkins,sonarqube,fxcop

According to this thread sonar.fxcop.mode is no longer supported. Quoted from the thread: You can skip the execution of FxCop on a specific project by using another Quality Profile for it, that does not contain any FxCop rule. Indeed, it is important for the evolution of a project's technical debt...

Sonar successful authentication without password

ldap,sonarqube

I found the solution of this problem, i changed the version of the plugin LDAP to sonar-ldap-plugin-1.4 and the authentication was worked correctly.

Using Jenkins plugin for SonarQube with two different installs and getting unexpected url for the new one

sonarqube,jenkins-plugins

In both cases the Jenkins plugin is using the URL that is printed at the end of analysis logs. Have you properly defined "sonar.core.serverBaseURL" in SQ Server settings?

SonarQube doesn't show any issues with Maven project

java,maven,sonarqube

The Java plugin is not installed. You probably forgot to copy the directory extensions/plugins when upgrading to 5.1.1.

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

sonarqube

I confirm the problem, jira ticket has been created. Thanks!

Sonar Runner default logging level

sonarqube

Short answer is NO Refer: Reduce log level in Sonar 2.1.x But other than this if you see logging of other sonar plugins you might, may have log level set to WARN....

Sonar fails to connect to mysql, running from gradle

android,gradle,sonarqube,sonar-runner

The (most important) property sonar.jdbc.url is missing in the sonarProperties section of your Gradle script, so no wonder why it is trying to connect to H2 (which is the default value for this property).

Configure Jenkin's SonarQube section using Job-DSL

groovy,jenkins,sonarqube,jenkins-job-dsl

In SonarRunnerBuilder class there is a project attibute that represent the path to a file with properties for project. In the same way which you set the JDK (jdk('(Inherit From Job)')) you can set properties path. In your example, try like this: StepContext.metaClass.sonar = { -> NodeBuilder nodeBuilder = new...

SonarQube - How to change severity of mulitple rules in bulk

sonarqube

I do confirm that this is not possible to bulk change the severity of a set of rules activated in a Quality Profile (whereas this is possible to bulk change the severity of a set of issues). Even if this might be useful from time to time, there is no...

Sonarqube Provide link in widget description

sonarqube

This is currently not possible. But we have an open ticket about such an improvement => http://jira.sonarsource.com/browse/SONAR-5674

SonarQube 5.1 analysis fail with StackOverflowError

java,maven,sonarqube,sonarqube-5.0

Problem solved. I ended up setting up a local instance and running the maven plugin using a debugger, this allowed me to set a breakpoint at the exception. I turned out that we had a test case (file) which had a field defined by hundreds of Strings. This file has...

Sonar false overall coverage (jacoco)

java,sonarqube,jacoco

I found the problem and the solution. From Sonar website I see this: By default, when no coverage report is found, the JaCoCo plugin will not set any value for coverage metric. This behaviour can be overriden to force coverage to 0% in case of a lack of report by...

(Java) if statement optimization

java,rest,annotations,jax-rs,sonarqube

If reflection is an option, you can always do something like public class Test { @PathParam("path") public Response doSomething() { return null; } public static void main(String[] args) throws Exception { Method method = Test.class.getMethod("doSomething"); Annotation annotation = method.getAnnotations()[0]; System.out.println(getValue(annotation)); } private static String getValue(Annotation annotation) throws Exception { Class<?>...

SonarRunner Unrecognized option: views

plugins,jenkins,sonarqube,sonar-runner

The reason for the problem is still unkown, but after re-installing the SonarQube plugin on Jenkins everything went back to normal. (Down-graded the plugin and updated it afterwards)

“IllegalArgumentException” in SonarQube Community plugin

android,android-studio,sonarqube,sonar-runner

You should configure a SonarQube server to use as per the README from the plugin repository: After the installation, you first of all need to configure the connection to your Sonar server. This is done per project and/ or module. You can use a remote server or a local one...

SonarQube 5.1 too busy due to ElasticSearch

sonarqube

Your server does not have enough available disk space to feed its internal Elasticsearch indices. Note that an external volume can be used by setting the property sonar.path.data (see conf/sonar.properties).

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

c#,sonarqube

even if I do understand that this might be misleading, not having any information about dependencies/librairies/design on C# projects is expected. FYI, in SQ 5.2, all those pages and relating metrics will be dropped, see the following Jira ticket: http://jira.sonarsource.com/browse/SONAR-6553.

Why sonar metrics are sometimes wrong?

c++,sonarqube,metrics,sonarqube-4.5

With an isolation of the specific problematic files, I found parsing errors : com.sonar.sslr.api.RecognitionException: Parse error at line 123 column 0 failed to match all of: parametersAndQualifiers virtSpecifier ctorInitializer compoundStatement functionTryBlock parametersAndQualifiers bracedInitList It appears sonar does not support some boost instructions like this one : BOOST_CLASS_VERSION(MyClass, 0) So next...

Is it a bug in SonarQube's JavaScript plugin that it doesn't pick up Surefire test results of tests that are in a subdirectory?

javascript,sonarqube,surefire,sonar-runner,js-test-driver

Well, I've delved into the SonarQube's JavaScript Plugin code to debug it. Found the bug. Looks like this bug only happens on Windows. What the code does is iterates over all the test files, in my case "PersonTest.js" and "dashboard/MonkeyTest.js", and looks for the file "dashboard\MonkeyTest.js". But because "dashboard/MonkeyTest.js" does...

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

java,plugins,sonarqube

Short answer is : with the currently available API you can't solve your third case. Now for the more detailed answer : How does sonarqube java plugin runs its analysis for now : it works source file (aka CompilationUnit) by source file and read bytecode for symbols out of this...

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

c#,resharper,sonarqube,bamboo,stylecop

You cannot use an existing .DotSettings file with SonarQube's R# plugin at the moment. This feature however will be added in the upcoming release of the R# plugin, refer to http://jira.sonarsource.com/browse/SONARRSHPR-15 for details. Note: The re-use reports mode was already supported in the past (with the C# plugin version 2.x),...

Upgrade SonarQube issues

service,jenkins,webserver,sonarqube,sonarqube-5.0

On Windows, the scripts are indeed different: if you haven't installed SonarQube as a service, you should read "Running SonarQube as a Service on Windows" to know how to start and stop if not, then: to start SonarQube, you have to execute the "StartSonar.bat" script: this will open a Command...

sonar-maven-plugin 5.1.1 not found

maven,sonarqube

The sonar-maven-plugin is an independent project that does not follow SonarQube versioning. Correct command-line is mvn org.codehaus.mojo:sonar-maven-plugin:2.6:sonar The groupId mvn.codehaus.sonar is for internal use....

SonarRunner: Unable to find file warning

android,android-studio,sonarqube,lint,sonar-runner

This warning is shown because the xml file is not indexed by the platform. As a consequence the android lint plugin tries to report your issue but the file cannot be found on the server side. This is a current limitation of the platform that should be addressed very soon....

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

maven,python-3.x,sonarqube

That's due to a bug in the plugin's parser: for the parameter list of a function declaration, it only recognizes Python 2.x syntaxes. I created the following ticket to fix it in the next version: http://jira.sonarsource.com/browse/SONARPY-122...

SonarQube 5.1 PAM - no jpam in java.library.path

sonarqube,pam,nativelibrary

I'd print the java.library.path variable. The only thing I can think of is that the jpam lib is in the wrong place or there is an issue with permessions (did you check the sonarqube user can actually read that file?) UPDATE Check java.library.path in settings->system info page Move jpam lib...

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

java,out-of-memory,sonarqube,sonar-runner

I guess you don't really need to pass Ant objects as extension so I suggest you give a try to ForkedRunner instead of EmbeddedRunner. This would allow you to start with a clean JVM for each analysis. FYI we are currently working on improving the embedded mode to support running...

SonarQube Quality Gates: TODO comments

jenkins,sonarqube

You should activate the rule S1135 ("TODO tags should be handled") of the Java plugin: http://nemo.sonarqube.org/coding_rules#rule_key=squid%3AS1135. It will raise issues on every occurrence of TODO comments.

Multiple inheritance for Quality Profiles

sonarqube

This feature is not planned for the moment - even though it has already been discussed a couple of times. Multiple inheritance offers some good features that we can understand. Your use case is a good example. But it also brings complexity when it comes to decide what to do...

How to add static member variables Jacoco Test Coverage?

java,sonarqube,jacoco,jacoco-maven-plugin

The JaCoCo measures test coverage based on percentage of bytecode which was actually executed. Declaring static final primitive or String constant creates no bytecode to execute, it's just an entry inside the constant pool. The only bytecode you have here is an implicit default constructor, usually like this: aload_0 invokespecial...

How to restrict access to dashboards by user/group permissions?

sonarqube

I do confirm that this is not possible to share a dashboard only with some users or groups. When sharing a dashboard, you share it with all users.

TFS with SonarQube, no product projects, only test projects

sonarqube,tfsbuild,tfs2013

Turns out that the MsBuild runner looks at the full path of your project to see if it's a Test project. so if your Build agent name or Build definition name or any folder leading up to your project file has the word "test" in it, all projects will be...

sonarqube typescript plugin: “You must install a plugin that supports the language”

typescript,sonarqube,sonar-runner

Okay, I figured out how to solve this specific problem. The key sonar.language in my sonar-project.properties should be set to ts, not typescript. # Language sonar.language=ts I figured this out by looking at example project corresponding to the javascript plugin: https://github.com/SonarSource/sonar-examples/blob/master/projects/languages/javascript/javascript-sonar-runner/sonar-project.properties. Here, the language is set to js not javascript....

SonarQube P2 repository has gone forever

eclipse-plugin,sonarqube,p2

The new update URL is: http://downloads.sonarsource.com/eclipse/eclipse/ This will be updated on the Eclipse Marketplace....

SonarQube 5.1 Adding Custom Rule for java

java,maven,sonarqube,sonarqube-5.0

You have to enable your new rules on a quality profile.

sonar ERROR Timeout trying to lock table “PROJECT_MEASURES”; SQL statement:

plugins,views,sonarqube,sonar-runner,sonarqube-5.0

Found the solution to the first issue. I was doing a POC on using Views Portfolio plugin and it requires to regularly run "sonar-runner views" command to publish/fetch new data for Views. There was a Jenkins job which was running just "sonar-runner views" every 2 minutes and at the same...

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

java,sonarqube

It's not surprising that your code is treated as non-compliant - it violates Java Code Conventions. It's up to you to follow code conventions or not, but consider the fact that code written in common style is much more easier to understand. According to the Java Code Conventions if-else statements...

Upgrade H2 from sonarqube 4.5.1 to 5.1.1

sonarqube,upgrade,h2

H2 DB upgrade is not supported. As you can see at the bottom of each page of your running SonarQube instance, H2 must be used only for testing purposes.

SonarQube - Temp directory is not writable

sonarqube,sonarqube-5.0

Same as previous message SonarQube - Unable to load the Wrapper's native library 'wrapper.dll': can you verify that you have a Java 64 bits installed, because it looks as 32 bits version.

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

java,sonarqube

The issue is due to some Checkstyle rules. If you remove them, this solves the problem. For further reference: http://sonarqube.15.x6.nabble.com/ArrayIndexOutOfBoundsException-while-decorating-Java-file-td5034646.html...

Running SonarQube on internal Web Server

web-services,iis,sonarqube,sonarqube-5.0

Resolved. I had to check "Reverse rewrite host in response headers" option in IIS -> Machine -> Application Request Routing Cache -> Server Proxy Settings. ...

Pass sonar's PT_RELATIVE_PATH_TRAVERSAL in java

java,sonarqube,path-traversal

Depending on your version, you can mark the issue as "Won't fix" (meaning that the debt from this issue is accepted - since 5.1) or "False positive" (meaning that you think that the analysis engine is wrong - before 5.1).

Sonar test coverage does not include indirect classes

java,sonarqube

You can easily achieve what you want. This is a matter of how you configure JaCoCo so it has little to do with SonarQube. For example in SonarQube Eclipse project we need that since unit tests are in a separate module. So we have configured JaCoCo to use the same...

Relationship between SonarQube Runner and SonarQube.MSBuild.Runner

tfs,msbuild,sonarqube,sonar-runner

@Techtwaddle is correct: the MSBuild.Runner invokes the sonar-runner. The MSBuild.Runner v0.9 does the following: fetches configuration settings from the SonarQube server; gathers information during the MSBuild phase; generates a sonar-project.properties file; invokes the sonar-runner to carry out further analysis. Some of the analysis is now performed before calling the sonar-runner....

Sonarqube Eclipse plugin not working in incremental analysis mode

sonarqube,sonarqube5.1

By default, analysis in Eclipse is happening in "incremental" mode, so you don't need to specify the sonar.analysis.mode property. Also, the Eclipse plugin always report every issue found in your code, may it be a new one (= you've just introduced it) or an existing one. As described in the...

How to update project using gradle automatically when executing sonar-runner?

android,sonarqube,android-gradle,lint,sonar-runner

Simply add a new line to module build.gradle file, just after sonarRunner task declaration: sonarRunner { tasks.sonarRunner.dependsOn build // <- This new line sonarProperties { ...

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

sonarqube,sonarqube-4.0

The message Access denied for user 'sonar'@'172.23.48.129' is telling you that the user sonar cannot connect to the database schema of your SonarQube 4.1 instance from your machine (with IP address 172.23.48.129). Please check permissions for this schema, for smooth operations you should have something like: GRANT USAGE ON `sonar`.<your...

SonarQube: Issues for one project are not displayed

sonarqube

It looks like a string escaping bug. If you rename your project to remove the quote character, the page will display correctly. I have created a JIRA issue to track this, will be fixed in 5.2 (and maybe backported to 5.1.x).

Custom roslyn-based inspections in Sonarqube

.net,sonarqube,roslyn

It's not yet possible but it will once this ticket will be resolved : http://jira.codehaus.org/browse/SONARCS-456

integration coverage results not shown in sonar

maven,jenkins,sonarqube,jacoco,surefire

The problem was that I configured jacoco wrong, so that the location of the reports was different from where sonar was picking them up from.

“LintError” found processing android lint report

android,android-studio,sonarqube,lint,sonar-runner

I should have taken a deeper look into lint-results.xml file. The error is fully explained there. In my case: <?xml version="1.0" encoding="UTF-8"?> <issues format="4" by="lint 24.1.2"> <issue id="LintError" severity="Error" message="No `.class` files were found in project &quot;debug&quot;, so none of the classfile based checks could be run. Does the project...

Is there a way to simplify this maven command for sonar?

maven,sonarqube

Quick Answer: No - not by declaring dependencies nor by having the plugin be in charge of the lifecycles and their phases to be run prior to the plugin's goal. By mvn clean compile sonar:sonar you are instructing Maven to first run the entire clean-lifecycle with all its phases -...

Logging error when executing Maven SonarQube plugin

maven,logging,sonarqube

Replacing default Maven logging implementation is currently not supported. Ticket created: http://jira.sonarsource.com/browse/MSONAR-122

SonarQube Lombok Getter recognition

sonarqube,lombok,sonarqube-4.5

You have to provide the 3rd party libraries you use (ie your classpath) via sonar.java.libraries property for the analyzer to be able to detect that you are using Lombok and make the correct exclusions.

SonarQube not running on CentOS

sonarqube,virtual-machine

The error log "Unable to start JVM: No such file or directory (2)" means that the path to java executable does not exist. Please check that /usr/java/jdk1.8.0_40/bin/java, as you configured in wrapper.conf, is correctly installed.

Working with SonarQube rules

sonarqube

You can install Checkstyle and FindBugs separately, enable their rules in your profile and thus use them in your analysis. However, @SonarSource has made a concerted effort to replace such rules with 'native' rules, and if you do install these extra plugins, you will find many of their rules marked...

Single Jenkins instance using multiple Sonar instances

java,jenkins,sonarqube

Yes, in Manage Jenkins > Configure System you can add as many Sonarqube installations as you want in the Sonar section. Then when you configure a job to perform the Sonar analysis you can select what instance you want to use from a drop down list.

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

java,sonarqube

Thank you for your feedback. There is obviously an issue regarding how the rule StringToStringCheck currently handle method invocations. The rule is new and has been introduced in java plugin 3.3. To resolve the issue and continue with the sonar analysis, simply disable rule squid:S1858 ("toString()" should never be called...

Is it possible to see per commit impact in Sonar?

git,continuous-integration,sonarqube,code-quality

To the best of my knowledge, Sonar (and its plugins) are not capable of doing that because Sonar is a batch tool. What you are looking for is a truly incremental analysis tool that analyzes every commit in a repository. Teamscale is exactly what you are looking for. You can...

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

javascript,c#,css,.net,sonarqube

You need to set sonar.sourceEncoding=UTF-8 in your sonar-project.properties file for UTF-8 BOM characters to be properly taken into account. Now, I was able to reproduce the parse error on CSS files with the CSS plugin 1.2, which does not yet understand UTF-8 BOM characters. However, on C# and Javascript files,...

SonarQube catch 22 with serializable lists

java,sonarqube

It looks your issue was solved just two days ago. http://jira.codehaus.org/browse/SONARJAVA-808...

“Fail to execute ES search request” popup alert in SonarQube web UI after upgrading from 4.5.1 to 5.1

configuration,sonarqube

I solved this by rebuilding Elastic Search indices: Stop your SonarQube server Remove the contents of the $SQ_HOME/data/es directory Start the server SonarQube will recreate indices on startup....

SonarQube: Get all Issues of a particular user

version-control,sonarqube

With the latest issue page (on version 5.1 of SonarQube) you can search issues by author. Just click on Issues in the top bar and select the author facet. Have a look on nemo to see this feature (and all my issues ;) )

Technical debt on custom web rule in sonarqube 5.1

web,annotations,sonarqube,sonar-runner,sonarqube-5.0

You can take a look at how this is implemented on the numerous SonarQube open-source plugins that are developed by SonarSource and the SonarQube community. For instance, on the Java plugin, you can look a some classes like AnonymousClassShouldBeLambdaCheck. You will see that the following annotations are used to declare...

SonarQube rules getting disabled on startup

sonarqube

It's most likely that you don't have the same set of plugins between the 2 instances. Please check the contents of the $SQ_HOME/extensions/plugins directory on both servers, if they are not the same you will have to install missing plugins using the Update Center. Also note that sharing the same...

SonarQube 5.0.1 - Error declaring a false-positive issue

sonarqube,sonarqube-5.0,false-positive

This can happen when the ElasticSearch index of issues is out of sync with the database. You should stop your server, remove the $SQ_HOME/data/es directory and restart the server. It might take some time, depending on the number of issues in your database, but it should solve the problem.

SonarQube LDAP authentication is not working

authentication,ldap,authorization,sonarqube

"Enable Access Control" is for authorization to access the LDAP Directory Information Tree (and not for authorization of the application). I discovered this later. For application level authorization, attributes like memberOf or isMemberOf are used. Apache Directory Server does not support the memberOf or isMemberOf attribute as on the...

Sonar: Create new rule for Android Lint

android,xml,xpath,sonarqube,lint

Accidentally I have found how to do this. Steps: Log in as administrator or other user with sufficient rights. Look for XPath rule for the language, XML in this case. Press Create button near "Custom Rules" text and fill form. Do not forget to activate this custom rule in your...

How to exclude a directory from the code analysis?

sonarqube,code-analysis

I had to use a different setting. Instead of Configuration->Settings->Exclusions->Files->Source Files Exclusions I had to use Configuration->Settings->Exclusions->Issues->Ignore Issues on Multiple Criteria. In this setting, I had to set the RULE KEY PATTERN to *, and I had to set the path wildcard in the FILE PATH PATTERN, **/Migrations/. works perfectly....

How do I set task properties in a Gradle Plugin

gradle,sonarqube,sonar-runner,gradle-custom-plugin

I discovered that I could use project.getExtensions().sonarRunner.sonarProperties{ ... } to set the sonar properties. See example below. class MySonarPlugin implements Plugin<Project> { @Override void apply(Project project) { project.apply plugin:'sonar-runner' project.getExtensions().sonarRunner.sonarProperties { property 'sonar.host.url', 'http://mySonar.company.com' property 'sonar.jdbc.url', 'jdbc:mysql://127.0.0.1:1234/sonar' } } } ...

How to execute Unit Test with Sonar Qube 5.0.1

unit-testing,sonarqube,code-coverage,gallio,opencover

Gallio support has been removed from sonar version 4.3 .From now on you have to produce your own test results and import them in sonar. hope this helps. Please like the comment if you find it useful

max_allowed_packet, I don't have MySQL

mysql,sonarqube,sonarqube-5.0

I found the answer myself. Looks like I don't realize how the database works in Sonarqube. So by DEFAULT, sonarqube use H2. This is a good one, and I believe such my problem won't happened. Turned out someone from my company actually used his own MYSQL server. So, I found...

Build failure due to Sonar plugin

service,jenkins,sonarqube,sonarqube5.1

You will want to update the SonarQube Java plugin to a more recent version, your error comes from a deprecated API which was removed as of SonarQube 5.1 - and fixed in more recent versions of SonarQube Java (latest as of writing is 3.3).