Accessing previous metric values

I’ve created a plugin that includes custom metrics, and I calculate their values manually. However, there are cases where during a specific analysis I don’t calculate a particular metric’s value. In such cases, I’d like to retrieve the previous value of that metric from the project’s history and store it in the current analysis. How can this be achieved?

I’m using org.sonarsource.api.plugin version 10.1.0.809

Hi,

I believe you would need to do this with web-API calls. Analysis is very much a “now” thing. There’s no real provision for looking backward during it.

 
Ann

1 Like