This change fixes "String literals should not be duplicated" (id = java:S1192) identified by Sonar.
Details
This change defines a constant for duplicated literal expression values, simplifying the refactoring process and mitigating the risk of overlooking any values during updates.
Remediation
This change fixes "String literals should not be duplicated" (id = java:S1192) identified by Sonar.
Details
This change defines a constant for duplicated literal expression values, simplifying the refactoring process and mitigating the risk of overlooking any values during updates.
Our changes look something like this:
More reading
* [https://rules.sonarsource.com/java/RSPEC-1192/](https://rules.sonarsource.com/java/RSPEC-1192/)I have additional improvements ready for this repo! If you want to see them, leave the comment:
... and I will open a new PR right away!
đ§đ€ Powered by Pixeebot
Feedback | Community | Docs | Codemod ID: sonar:java/define-constant-for-duplicate-literal-s1192