Hi,
My java has these two “Deprecated” rules activated: java:S5738 and java:S1874.
I want to detect deprecated java code for each new pull requests.
The issue is that these 2 rules are never triggered. We tried modifying existing classes or even by creating a new one, with noncompliant code.
What am I missing ?
br
Didier
Hey there.
How are you executing analysis? Are you using Automatic Analysis?
This comes with some limitations for Java, including:
- Of the rules in the Sonar way quality profile, only a subset (about 80%) are currently supported.
java:S5738 and java:S1874 fall into this subset of unsupported rules, as they rely heavily on information that Automatic Analysis does not have when performing analysis, only available in the context of CI-Based analysis following a full build (via mvn sonar:sonar
or gradle sonarqube
.
If you need these rules, I can recommend switching to CI-based analysis.
If I’m completely wrong and you’re already using CI-based analysis, let us know!