Right now Sonar quality gate we're using in the project (custom one, Java-based project) is returning information whether NEW CODE did not introduce NEW smells/vulnerabilities/etc. What I have in mind is to introduce positive feedback from Sonar when running checks.
I would like QG to also return information by how many percent/points/etc the code quality was INCREASED if the PR also fixed some preexisting smells/issues. So far I don't see a way to achieve that using existing metrics - https://docs.sonarqube.org/latest/user-guide/metric-definitions/ - they only provide information about newly introduced problems and existing ones in general.
So my question is - is it possible to achieve what I'm trying to do using metrics from Quality Gate or should I try to create some custom plugin/other solution?