This works fine when I look at the analysis on the SonarQube server side. The rule is raised when I expect it. However, when I connect the PyCharm SonarLint plugin to the SonarQube server and try to run the rules, the logs show the following: Rule python-monorepo-import-rule is enabled on the server, but not available in SonarLint. I was of the impression that the custom plugins should in fact be available to SonarLint, so any help would be greatly appreciated.
Have you marked the plugin as compatible with SonarLint in the manifest? From the docs:
Note: Custom rules written in Java will run in SonarLint if SonarLint compatibility is properly notated in the custom plugin manifest, see this example for the syntax.
Can you check the GET api/plugins/installed API (http://localhost:9000/api/plugins/installed) to see if the plugin is marked as sonarlint compatible there?
Thanks. I’m not sure how to square these two things (sonarLintSupported is true but a Rule python-monorepo-import-rule is enabled on the server, but not available in SonarLint. error).
I wasn’t able to reproduce the issue. Sonarlint works fine with the custom plugin that was developed following the example in the sample repo. I tested for both SonarQube versions: 9.9, which is the current LTA, and 10.3. Regarding SonarLint versions, it was tested for the latest versions on PyCharm and VSCode.
I would try to double check if the custom plugin follows all the guidelines.
Also, make sure that the rule is enabled in the active Quality Profile on the server.