Development issue/problem:

I’ve been very busy making the connection between these things. I followed the instructions from here: http://docs.sonarqube.org/display/PLUG/Android+Lint+Plugin and finally got the SonarQube 5.1.1 server with the Android Lint 1.1 plugin installed. Next I configured my multi-module Gradle build to work with the SonarQube plugin: see the code snippet of the root configuration below.

plugins {
id ‘org.sonarqube’ version ‘1.0’
}

sonarcube {
Properties {a9 Properties}

Property ‘sonar.host.url’, ‘sonarqube server:9000’
Property ‘sonar.jdbc.url’, ‘jdbc:mysql://sonarqube-db:3306/sonar? useUnicode=true&characterEncoding=utf8’
Property ‘sonar.jdbc.driverClassName’, ‘com.mysql.jdbc.driver
property sonar.jdbc.username, sonar
property sonar.jdbc.password, sonar
property sonar.sourceEncoding, UTF-8
property sonar.login, admin
property sonar.password, admin.

Owned sonar.profile, Android Ribbon.

property ‘sonar.import_unknown_files’, true
property ‘sonar.android.lint.report’, ‘build/outputs/lint-results.xml’
}
}

Then I performed a stack-sonar task to perform the analysis. As a result, I got most of the ribbon errors related to the retrolambda project (java.lang.UnsupportedOperationException: Unknown ASTNode child: LambdaExpression), which is quite normal, and lint-results.xml files (accompanied by an HTML version) for each module with descriptions of the problems found. The report indicates that there were 8 errors and 434 warnings. But it went wrong when the Sonarqube plugin tried to upload the results to the SonarQube server. The log was full of messages Impossible to find the file and Impossible to find the line. And when the processing was done, there was no problem with my project on the SonarQube server.

And I wonder what went wrong? I checked the paths and all the files were there. I’ve gone through all the discussions I’ve been able to have and it seems that my attitude is correct and that I’m doing everything right. Does anyone know what I’m missing and what needs to be checked? All suggestions and ideas are welcome.

I would also be happy if there was a way to import data from Ribbon via an external SonarQube runner, because this tool seems to be more predictable and stable than the Gradle plugin.

How can I solve this problem?

Solution 1:

I’ve had some success with a multi-module android project. Because the complete construction files take up too much space, I only show the relevant parts here.

I set up a hailstorm in the parents’ project:

blueprint {

Dependencies { classpath ‘com.android.tools.build:gradle:1.5.0’

}
plugins { id org.sonarqube version 1.1 }

In the sign-up project that I (and all the other children) set up:

sonarqube {properties {properties sonar.profile, Android Lintproperties sonar.sources, ./src/main/java}}}

This was the minimum requirement for the SonarQube plugin to start parsing projects.

Solution 2:

Your finalization settings look good, you have installed the Android plugin on the SonarQube server.

I don’t see this step in your question unless you go to Settings->System->Update Center and install the Android plugin.

Analyzing Android Project with Lint and SonarQube –

After installation, the SonarQube server must be restarted and the Sonar Runner must be restarted.

Good luck!

sonarqube android studio,sonarqube android medium,command to run sonarqube in android,sonar dashboard android,android sonar test,sonarqube android gradle,android lint,sonarqube android kotlin,android lint rules,android studio run lint

You May Also Like

How To Flash Samsung J1 Ace SM-110G: Best In 2021

How to flash the Samsung J1 Ace SM-110G: The best in 2021…

Back Up or Restore Data On Your Samsung Galaxy Note 10/10+

Learn how to easily back up and restore your data for Samsung…

Photo import not working on Windows 10? Try these solutions

4. Checking camera settings If you are having trouble importing photos to…

Microsoft releases Windows 10 Build 21296

Microsoft today presented Windows 10 build 21296 to Insiders on the Dev…