New Code conditions
Hi, I've got it working with multi-module project on PR branch. Thanks for this!
IME and per docs*, when it comes to enforcement of QG for PR branches, SonarQube uses only New Code conditions. Are there any plans for the plugin to support New Code conditions? Thanks.
*https://docs.sonarsource.com/sonarqube/9.9/analyzing-source-code/pull-request-analysis/
Hi @darrenyeats , what changes you made for plugin to work for PR branches?
Thanks Milind
I've made no changes, I refer to the normal scan report in the UI that includes Overall Code metrics (including Mutation testing provided by this plugin).
But only New Code conditions are picked up for a PR Quality Gate.
I do not see Mutation Metrics in New Code condition. is there anything required to do enable it?
I believe they don't exist. That's what my original question is about.
Ok thanks
Hi all,
atm there are no plans for new code conditions - mainly because I don't have any spare time to do it. But I'd be more than happy to accept any contributions in that regard!
To answer your questions whether there are any plans: no, there aren't.
Mainly because I don't have any spare capacity for any new development - the only thing I do atm is keeping the lights on. But any contributions to add new features, such as "new code" support (if it's possible at all) is much welcomed.
Hi all, I would like to join this discussion as me and my team would also like to specify the mutation-condition as "Condition on New Code". Our "relevant" build is the PR-build and currently all mutation conditions are just ignored due to the specified current limitation.
I just want to emphasize that for us this would also be very helpful. I would add a contribution, but I have no knowledge about SonarQube plugins... How would you start implementing this feature?
Regards Dave
Hi Dave, thanks for reaching out. Afaik, all the PR analysis stuff is only available in the commercial editions of Sonarqube. I don't have no such license and therefore could not implement & test it on my own and thus can not support this feature in any way. The metrics are computed in https://github.com/devcon5io/mutation-analysis-plugin/tree/master/src/main/java/ch/devcon5/sonar/plugins/mutationanalysis/metrics . It's run on the server side. That's maybe a starting point for your implementation.
Cheers, Gerald