I am trying to get a source code analysis for a groovy gradle based project. I have generated the jacoco repotrs and given the source destination and class destination also. It is showing how much percentage of coverage i will get after i merge, But the source code analysis is not happening. On new code it is showing nothing since it is not able to read my source code. does anyone face this before. I have mutiple projects configured and my android projects are working fine. but my groovy projects is not getting code anaysis.
This implies that you’re analyzing a pull request.
But pull request analysis only analyzes what changed in the pull request. Since you seem to still be in a testing phase… did you actually change any code? Because if you didn’t, then it’s quite normal not to see much in SonarQube after you analyze the PR.
Hi,
Yes you are right, This is about analyzing PR.
We had this in place before and recently we moved to developer edition.
As you said i have some changes in my PR, and still it didnt show any code change or analysing my code.
I am using this sonarTask in couple projects, and the android projects works fine. But the groovy based gradle projects are one not showing any code change or failing in the pr analysis.
I have set these properties also.
It looks like you’re using the vanilla SonarScanner CLI for analysis. But… how are you building your Groovy projects? With Gradle? If so, you should be using the SonarScanner for Gradle. Among other things, it’ll save you a log of configuration.
Speaking of configuration, this does nothing and can be removed:
Can you provide your analysis log?
The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.
Pull request a421605-dev for merge into v3UninstallApk from a421605-dev
The log you’ve provided is a PR analysis log. For PRs, we only analyze & report on the lines/files that were changed in the PR. So, what changed in this PR?
Thanks for that clarification. Looking back at that log, nothing jumps out at me. Since this is Groovy, and we don’t support it natively, I would normally advise you to reach out to the maintainers of that plugin. However, I believe it’s abandoned.