Hi SonarQube team,
I’m using SonarQube 8.9LTS by analyzing a multi-module maven project.
It’s a Java 15 project unless the api submodule that is configured with maven.compile.source=1.8
When analyzing this project, some issues are raised on my Java 8 submodule by the rule Deprecated annotations should include explanations which is specific to Java >= 9.
According to the doc:
Java analysis is able to react to the java version used for sources. This feature allows the deactivation of rules that target higher versions of Java than the one in use in the project so that false positives aren’t generated from irrelevant rules.
The feature relies entirely on the
sonar.java.sourceproperty, which is automatically filled by most of the scanners used for analyses (Maven, Gradle). Java version-specific rules are not disabled when
sonar.java.sourceis not provided. Concretely, rules which are designed to target specific java versions (tagged “java7” or “java8”) are activated by default in the Sonar Way Java profile. From a user perspective, the feature is fully automatic, but it means that you probably want your projects to be correctly configured.
So any ideas why it’s not working for me?