intellij idea - SonarQube plugin with Android Studio -



intellij idea - SonarQube plugin with Android Studio -

has succeeded in getting either sonarqube community intellij plugin or 'official' sonarqube intellij plugin show results of static code analysis in android studio projects?

the sec of these requires maven first of these supposed agnostic.

somehow managed run sonarrunner on project in past can't manage now. there's not much point in getting working 1 time again if can't see results in ide.

short answer: yes can using sonarqube community intellij plugin

long answer:

assuming have build.gradle like:

apply plugin: "sonar-runner" sonarrunner { sonarproperties { // can set on command line -dsonar.analysis.mode=incremental property "sonar.host.url", "http://your.sonar.server:9000" property "sonar.analysis.mode", "incremental" property 'sonar.sourceencoding', 'utf-8' property 'sonar.language', 'java' property 'sonar.profile', 'my_profile' } } subprojects { sonarrunner { sonarproperties { properties["sonar.sources"] += "src/main/java" } } } ....

then can run local sonar analysis gradle:

$ ./gradlew sonarrunner

this produce sonar-report.json file:

$ cat build/sonar/sonar-report.json

now have needed plugin:

sonarqube server name: your_server host url: http://your.sonar.server:9000 local analysis script name: gradle script script: /path/to/android-studio-example-project/gradlew sonarrunner path sonar-report.json: /path/to/android-studio-example-project/build/sonar/sonar-report.json

after configuration done can see new issues running sonarqube (new issues) inspection within intellij (android studio)

i have used project example:

https://github.com/sonar-intellij-plugin/android-studio-example-project

and sonarqube server 4.0 squid based rule set (4.4 failed analyse gradle project)

android intellij-idea android-studio sonarqube sonar-runner

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -