Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clover sensor not firing for groovy projects #44

Open
prestontim opened this issue Nov 18, 2020 · 4 comments
Open

Clover sensor not firing for groovy projects #44

prestontim opened this issue Nov 18, 2020 · 4 comments

Comments

@prestontim
Copy link
Contributor

This is not really a bug report, but I'm not sure where else to post my question...

I have been unable to figure out why one of my projects is not importing the Clover coverage into SonarQube EE (8.5.0).

I am setting the sonar.clover.reportPath property (see screenshot) and the file is present/valid. However, I am getting the following message when I run my (Gradle) SonarQube scan with debug-level logging:
'Clover Coverage Analysis' skipped because there is no related file in current project

So what am I missing? What files/properties are needed to make the Clover sensor fire?

I can provide logs, scanner context, etc., but I'm not sure what would be valuable at this point. Any assistance is appreciated.

image

@prestontim
Copy link
Contributor Author

image

@prestontim
Copy link
Contributor Author

prestontim commented Nov 18, 2020

Here are the relevant bits of Gradle sonarqube config from my build script (I'm using version 2.8 of the 'org.sonarqube' gradle plugin and have also tried 3.0 with the same results):

sonarqube {
    properties {
        property "sonar.projectKey", "********************"
        property "sonar.projectName", "********************"
        property "sonar.login", "********************"
        property "sonar.host.url", "********************"
        property "sonar.core.serverBaseURL", "********************"
        property "sonar.projectBaseDir", new File(".")
        property "sonar.clover.reportPath", file("$buildDir/reports/clover/clover.xml")

        def gitBranch = System.env["GIT_BRANCH"]
        def changeBranch = System.env["CHANGE_BRANCH"]
        def changeTarget = System.env["CHANGE_TARGET"]
        def changeKey = System.env["CHANGE_ID"]
        def isPullRequest = changeBranch && changeTarget && changeKey

        if (isPullRequest) {
            property "sonar.pullrequest.branch", changeBranch
            property "sonar.pullrequest.base", changeTarget
            property "sonar.pullrequest.key", changeKey
        } else {
            property "sonar.branch.name", gitBranch
        }
    }
}

@prestontim
Copy link
Contributor Author

This seems to be related to Groovy projects only. Coverage on Java projects is being imported properly, so I'm going to close this ticket out.

@Tony-Proum
Copy link
Member

Hi,
I'm preparing a release of this bug fix, #45 and seems related to this issue.
But testing the future 4.2 version of our plugin with sonarqube 8.9-community seems not to fix the bug. I have no report for groovy project
image
Maybe is there something missing for groovy projects ?

I reopen this issue to keep a track on what we are doing : but since the 4.2 release is focus on this bug fix, I think that we should fix it before releasing 😅

@Tony-Proum Tony-Proum reopened this May 26, 2021
@Tony-Proum Tony-Proum changed the title Clover sensor not firing Clover sensor not firing for groovy projects May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants