Hi, I am using SQ-8.1. I created sonarQube plugin and I tried to access Elasticsearch DB.Unfortunately I didin’t get any way to acces it. My purpose is to push some new violations to that DB. Is there any way to achieve it?
That’s really not how SonarQube works! Elasticsearch data is based entirely on the data in the database (it reads data from the database, it cannot push anything to the database). That does not mean you should write directly to the database (you shouldn’t… ever).
I would recommend sticking to the traditional model – a SonarQube analysis is initiated that analyzes code, detects issues, and sends a report to the SonarQube server to be processed. You can check out some great examples on how to build a custom plugin, as well as the usual docs for custom development.
Can I know about entity handling and how to access Database in SonarQube?
Nope! SonarQube database is a black-box that can change between versions without any warning.
What is wrong with the traditional approach?
I am developing a custom plugin. Therefore I am looking forward to add some new custom features. Is there any approaches to access db?