SONARJAVA-6511 Decrease number of FPs for the rule S125#5698
Conversation
12c405d to
1976bdb
Compare
f05c01a to
a0265b9
Compare
a0265b9 to
7d4c5d8
Compare
ce99ff4 to
63fef8b
Compare
|
Code Review ✅ Approved 1 resolved / 1 findingsRefined the S125 comment analysis to distinguish trailing semicolons from code indicators, resolving the issue where semicolon probability was incorrectly coupled to the detection threshold. ✅ 1 resolved✅ Quality: ';' detector probability silently coupled to THRESHOLD
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |




Semicolons in the end of comment's lines can be punctuation marks and not code indicators. We have a lot of user feedback pointing on it.
This PR removes FPs for comments where the only sign of code is that line ends with ';'. Comments that additionally have some indicators like CamelCase or keywords are still recognized as code.
This change unavoidably adds some amount of FNs. To reduce them the pattern is tuned to react on typical Java commented messages like System.out(err).print.