How to create your own metric using the Sonar API

I am creating a plugin for Sonar, and I need to create my own metric, as there are no key metrics in the Sonar API that satisfy my needs.

I need to display this metric on the toolbar.

Any help is much appreciated!

+5
source share
1 answer

You can find examples in the community plugins for the SonarQube project.

For example, the Sonar artifact size plugin defines some additional metrics. You can see the code at https://github.com/SonarQubeCommunity/sonar-artifact-size/tree/master/src/main/java/org/sonar/plugins/artifactsize

+5
source

All Articles