Violations when duplicating string literals in logging statements
Steps to reproduce
Add three logging statements, such as:
logger.warning("Failed to load service"); logger.warning("Failed to load service"); logger.warning("Failed to load service");
Previously reported here: https://stackoverflow.com/questions/44561234/scope-of-rule-string-literals-should-not-be-duplicated-squids1192 and here: https://groups.google.com/forum/#!topic/sonarqube/B1iUm_LJz60
I think this is a very serious false positive as the severity of the rule is very high (CRITICAL) whereas the statements in this ticket, I could argue, are not even issues (apart from increasing the standard code duplication metric).
The precondition for this rule is that there might be business logic attached to the string literal value.
If the string literal value only exists within the scope of a logging statement I don’t see the problem.