SONARJAVA-5537 S7476 remove FPs and reduce noise#5158
SONARJAVA-5537 S7476 remove FPs and reduce noise#5158erwan-serandour merged 6 commits intomasterfrom
Conversation
The rule doesn't raise anymore on: - licence headers at the start of files - on java code with source version above or equal 23. we don't raise an issue if a markdown comment start with 4 slashes.
| .withCheck(check) | ||
| .withJavaVersion(23) | ||
| .verifyIssues(); | ||
| .verifyNoIssues(); |
There was a problem hiding this comment.
We don't have any examples starting with 4 or 5 /? Why not? I can imagine someone writing //// instead of ///.
| { | ||
| "ruleKey": "S7476", | ||
| "hasTruePositives": true, | ||
| "hasTruePositives": false, |
There was a problem hiding this comment.
Is this rule skipped in autoscan? I thought we would have a few examples from the code introduces in unit test.
There was a problem hiding this comment.
it is because autoscan set the java sources to 23.
| } | ||
|
|
||
| @Test | ||
| void test_after_java23() { |
There was a problem hiding this comment.
"after 23" would be at least 24 :) Can we call is test_java23?
|
| public class CommentsMustStartWithCorrectNumberOfSlashesCheckJava23 { | ||
| // This is a comment | ||
| public void twoSlashes() {} | ||
| /// javadoc using markdown |
There was a problem hiding this comment.
Let's use blank lines between declarations when they have a comment.




SONARJAVA-5537
The rule doesn't raise anymore on: