Hi,
we are facing an issue with rule java:S1123 in combination with pull requests.
Rule reference: Java static code analysis: Deprecated elements should have both the annotation and the Javadoc tag
Situation:
- Within a PR an existing method had been annotated with @Deprecated
- The rule java:S1123 did not match in the PR and no issue was created (Quality Gate passed, merge was possible)
- After the PR was merged, the target branch had a match for java:S1123 in the header of the method that had been annotated within the PR → Major issue created → quality gate of the main branch failed
Expected behavior: As the match was on the method header only (which had not changed in the PR) it should at least also match on the @Deprecated annotation.
We are at SonarQube 9.4 (developer edition), but I could not find an indication, that the rule has been changed in the meantime.
Could you please consider updating this rule?
Thanks and best regards
Christian