Files missing from coverage report

119 views
Skip to first unread message

Jonathon Gray

unread,
Mar 30, 2018, 3:14:14 PM3/30/18
to SonarQube
Hello!

There are a couple of files missing entirely from the Coverage report on the SonarQube dashboard.  The logs show the following errors:

Unable to create symbol table for : /home/.../app/src/main/java/com/something/yadda/blah/utility/CallLogHelper.java
java.lang.IllegalStateException: Expected to have a deferred type but got List

Unable to create symbol table for : /home/.../app/src/main/java/com/something/yadda/blah/utility/FcmService.java
java.lang.IllegalStateException: Expected to have a deferred type but got Object

This is an android project, below are the SonarQube properties..

properties {
    def libraries = project.android.sdkDirectory.getPath() +
            "/platforms/android-25/android.jar,"
    property "sonar.libraries", libraries
    property "sonar.java.libraries", libraries
    // key and name are identifiers used in the SonarQube dashboard
    property "sonar.projectKey", getProject().name
    property "sonar.projectName", "[PROJECT_NAME]"
    property "sonar.sourceEncoding", "UTF-8"
    // first defines where the java files are, the second where the xml files are
    property "sonar.sources", "src/main/java,src/main/res"
    property "sonar.tests", "src/test/java" // where the tests are located
    // where the compiled binaries and libraries are. Note that [PRODUCT_NAME]/debug is being used for the binaries. This means the [PRODUCT_NAME] debug flavor
    // is the one used for reporting
    property "sonar.java.test.binaries", "build/intermediates/classes/[PRODUCT_NAME]/debug"
    property "sonar.java.test.libraries", libraries
    // both reportPath and reportPaths may be used for the unit test code coverage report
    property "sonar.jacoco.reportPaths", "build/jacoco/test[PRODUCT_NAME]DebugUnitTest.exec"
    property "sonar.jacoco.reportPath", "build/jacoco/test[PRODUCT_NAME]DebugUnitTest.exec"
    // file for instrumentation/UI test
    property "sonar.jacoco.itReportPath", instrumentationFileName
    property "sonar.scm.provider", "git"
}

Thanks in advance,
J

Nicolas Peru

unread,
Apr 27, 2018, 10:07:36 AM4/27/18
to Jonathon Gray, SonarQube
Hi, 

Which version of SonarJava are you using ? can you share a bit more the stacktrace of the errors ? 
The fact that coverage is missing might be related to this as the semantic seems to be failing and thus the mapping from class to file cannot be achieved to report coverage.

Cheers, 

--
You received this message because you are subscribed to the Google Groups "SonarQube" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarqube+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarqube/22438a63-ca5a-48cd-980e-c580462ae063%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Nicolas Peru | SonarSource
Reply all
Reply to author
Forward
0 new messages