intellij-plugin-save-actions
intellij-plugin-save-actions copied to clipboard
Make "final modifier to local variable" exclusive in UI
Makes sense now - so only check the Add final modifier to local variable or parameter except if it is implicit.
Would it ever make sense to check both? If not then it might be worth adding some mutually exclusive validation to those two checkboxes
Originally posted by @chriswhite199 in https://github.com/dubreuia/intellij-plugin-save-actions/issues/168#issuecomment-642849429
Also make sure existing users gets one of the checkbox selected to false.
Hey, just wanted to bump this as we just had a problem related to this. When both options are checked - which indeed makes no sense - the final parameter will be added everywhere where possible which triggered this PMD rule on our code: https://pmd.github.io/latest/pmd_rules_java_codestyle.html#unnecessarymodifier
This plugin basically makes code violate a PMD rule by default 😱
Hey @SaltyAimbOtter :wave: thanks this is on my radar, but I'm swamped right now so I won't have time to implement this anytime soon. I'm accepting PRs though.