SonarQube for IntelliJ plugin version: 10.16.1.80464
IntelliJ version: IntelliJ IDEA Ultimate 2024.3.2.2
Programming language you’re coding in: Java
Is connected mode used: Yes, but the problem also occurs in standalone mode.
SonarQube Community Version 9.9.2 (build 77730)
And a thorough description of the problem / question:
Hi,
I’m encountering an issue with the SonarQube integration in IntelliJ IDEA Ultimate 2024.3.2.2, using the SonarQube for IDE plugin version 10.16.1.80464.
I have followed the non-compliant code example from the SonarQube rule RSPEC-1161, and implemented it in my project, but the analysis does not detect any violations. Despite the code clearly violating the rule, the analysis reports “0 issues detected.” For other rules, violations are detected.
This problem occurs in both Standalone Mode and Connected Mode.
I tried it out: If the classes are in the same file, the rule works and the issue is detected. However, in real projects, this configuration is more the exception. In most cases, the parent method, interface and abstract method are in separate files.
I have tried the use case, and I have to agree that the first time, SonarQube for IDE didn’t detect the issue if the parent class was in another file (the common case).
But, after compiling the project now it shows the issue as expected :