The Jenkins verify build does execute the CI tests, but is there a way to confirm how the metrics look in Sonar before the code is merged?
I'm assuming the merge will result in a build that updates sonar, but it would be handy if there was a way to check on incremental progress before requesting the merge.
You can integrate sonarlint into your IDE. I'm using intellij and have connected it to sonar.onap.org to pull ONAP sonar profile locally.You can pull the patch, run sonarlint and it will tell you the issues locally and allow you to see if they are resolved.
Thanks for the hint Marcus. Since I didn't have intellij setup I investigated further and discovered some lack of understanding in my original question. In case others have the same confusion:
I was able to quickly download the JaCoCo library, and execute a command line report to generate an html file which displayed code coverage. See http://www.eclemma.org/jacoco/
Using this spot to capture the command I used on ubuntu 16.04 dev environment:
java -jar ./jacococli.jar report <path to>/jacoco-ut.exec \ --classfiles <path to>i/target/classes --html $HOME/jacoco.html
To see Sonar results in Eclipse, install SonarLint, https://www.sonarlint.org/eclipse/. Then you can bind your projects to the ONAP Sonar.
But you will only see tiems regarding static code analysis. To see code coverage, you also need to install EclEmma, https://www.eclemma.org/installation.html.
Powered by a free Atlassian Confluence Open Source Project License granted to The Linux Foundation. Evaluate Confluence today.