When I analyzed my project using CodeNarc I get huge number of UnnecessaryGString
violations.
I can fix them one by one by pressing ALT+ENTER and choosing Convert to String
option. This is very tedious process though.
Is there any autofix in IntelliJ to replace all unncessary GStrings with Strings? If not, what do I need to do to create my own?
Currently I use error prone replacement from "([^$\n"]+)"(?!\()
to '$1'
. It gives some false positives on more complex cases (e.g. with escaping).