after updating the SonarJava 6.0 (currently 6.0.1 - build 20589), custom rules created from a template stopped working. (SonarQube 7.9.2.30863 currently, but the problem was also present in 7.9.1).
I helped myself by “carefully” fixing the database:
update rules set plugin_name = 'java' where plugin_name = 'squid' and status != 'REMOVED';
(After making sure this only affected my custom rules)
Afterwards, those issues were detected again.
This will probably affect everybody who created custom rules from templates in older versions of SonarJava and updates to 6.0 or later.
I managed to reproduce the problem, indeed, it seems that rule templates created before 6.0 will not work after the update. I created a ticket to track this issue.
I’m glad you manage to find a workaround working for you, however, I have to warn future people tempted by this solution that they need to be careful and know what they are doing. If not sure, it’s better to wait further investigation.
@TobiX I’d like to warn you that updating database is not recommended at all and you may encounter strange behaviour.
I would recommend you to rollback your database to the state before the manual update of DB and to delete and re-created the rules created from templates.
I perfectly understand that this is not the best solution, but at least SonarQube will remain in a good status.