There’s nothing explicitly documented for this. Your best bet is to find a plugin or one of our open source analyzers that does something like this and work from that.
I’m new to sonar framework, do u mind to explain more on plugin or open-source analysers part? Maybe give some keywords or example what’s the next should I proceed to?