Wednesday, 18 August 2021

Sonar integration with lizard to track code complexity failing in android studio

I am trying to integrate lizard to track the code complexity of an android app on sonarqube. The command used to get the complexity report from lizard is:

lizard src/main -x"./test/*" -x"./androidTest" --xml >lizard/lizardReport.xml 

In the build.gradle file of the app, the sonarqube properties are configured as follows:

sonarqube { 
  properties { 
    property "sonar.sourceEncoding", "UTF-8" 
    property "sonar.host.url", "https://a.com/“ 
    property "sonar.login", “abc”  property "sonar.password", “abc”  property "sonar.projectKey", "abcd" 
    property "sonar.projectName", "ABCD" 
    property "sonar.projectVersion", android.defaultConfig.versionName  property "sonar.sources", "./src/main" 
    property "sonar.exclusions", "**/*test*/**,build/**,*.iml,**/*generated*" 
    property "sonar.tests", "./src/test/" 
    property "sonar.test.inclusions", "**/*test*/**" 
    property "sonar.import_unknown_files", true  property "sonar.java.lizard.report", "lizard/lizardReport.xml" 
  }
}

At the end of this setup, I am running the gradle sonarqube command to build the project and run the sonar setup but on viewing the report on the sonarqube dashboard, there is no trend for code complexity.

Is there something I am missing here?



from Sonar integration with lizard to track code complexity failing in android studio

No comments:

Post a Comment