Environment Details
- SonarQube Version: Developer Edition
10.2.1.78527
- Deployment Method: Docker
Issue Description
We are attempting to suppress specific warnings using the following annotation:
@SuppressWarnings(Array("scala:S1151"))
This is applied in a single file to ignore certain warnings. However, after applying it, we encounter the following SonarQube error:
“Define a constant instead of duplicating this literal ‘scala:S1151’ 3 times.”
String literals should not be duplicated. Rule scala:S1192
Observation
It seems peculiar that the analysis applies to annotations specifically intended to suppress analysis.