We’d like to do something similar, as in say we have 50K issues at the moment. We’d like to be able to look back month by month to see how we are progressing. But from the answers provided in the linked post, it doesn’t seem like SonarQube is really setup to do this. Its more of a “in the moment” tool. Is this still the case?
Your post raised a notification to me so let me respond:
But from the answers provided in the linked post, it doesn’t seem like SonarQube is really setup to do this. Its more of a “in the moment” tool. Is this still the case?
Yes an not. Issues details are kind of snapshot moments in the tool but we keep history of metrics (like count of issues, possibly broken down by severity, type etc).
So for instance the GET api/measures/search_history?component=<projectKey>&metrics=ncloc,coverage,blocker_violations,critical_violations,vulnerabilities API call would return the history of project in terms of Nbr of LoC, Code coverage %, blocker and critical issue count and vulnerabilities count.
I chose metrics randomly. GET api/metrics/list would give you the (huge) list of metrics that you can query.
And finally, if you want a readymade (open source contributed, not particularly SonarSource endorsed) tool that would take care of the API calls for you have a look at sonar-tools · PyPI, and specifically the sonar-measures-export tool.