Hi,
We have developed a plugin for Sonar that adds rules for Java and Python. Here is the link to the Github repository: Sonar Cryptography Plugin.
Recently we tried to update the plugin to support Sonar 10.x and we ran into a problem:
In a nutshell: After updating the API version to 10.x, our custom rules are no longer executed.
Details
Everything works fine using the following versions:
- SonarQube 9.9.6.92038
- SonarScanner for Maven 4.0
- Dependencies in the plugin:
- sonar-java 8.1.0.36477
- sonar-plugin-api 9.17.0.587
We do not get any output (neither success nor failure) or errors when we use the following versions:
- SonarQube 10.6.0.92116
- SonarScanner for Maven 4.0
- Dependencies in the plugin:
- sonar-java 8.1.0.36477
- sonar-plugin-api 10.10.0.2391 (tested also with 10.2.0.1908)
For testing we run SonarQube using Docker with a deployed postgres database.
Since we are not getting any errors (build and runtime), it is not clear what went wrong and there is not really a clear way how we could fix it. I tried to check what is actually executed and my impression is that the method in
CheckRegister
which is used for registering our Java rules is not executed. However, the rules are displayed in the SonarQube UI, so creating a new repository should have worked.
Hope you can help here, many thanks!