thank you for answer, but our goal is to create a new plugin to add some rules or tag existing rules as “eco-conception”. The main goal is to add some “greenIT” environment to SonarQube. This is a lack for us.
So, to avoid rewrite existing rules, we want to tag them with our new custom tag “eco-conception”.
The great solution for us is to add automatically our tag to existing rules when plugin is installed. We wouldn’t create a new system (like batch scripting) to do an initialization phase after plugin installation (using API calls for example).
Hi @dedece35 ,
this doesn’t seem to be achievable with current Plugin API. You can do what you want with the rules your plugin define but not with the rules other plugins define.
The work-around would be to call SonarQube Web API from inside your plugin, to achieve what you want, but this doesn’t seem in general as a clean, good practice.
thank you for answer.
I understand it but I find it unfortunate that we can’t do it programmatically in a clean way whereas we can do it with SonarQube API.
To stay in a clean way, I think we will create a script that install our plugin and then call SonarQube API to add our custom tag to all rules that we want.
Do you think, this is a good way int order to release our opensource plugin in SonarQube marketplace ?
Ok, thank you.
But, If I call Sonar Api in my plugin, do you think this will be OK ? Does SonarQube API is already available when plugins system intialize itself ?