intellij-plugin-save-actions icon indicating copy to clipboard operation
intellij-plugin-save-actions copied to clipboard

Make "final modifier to local variable" exclusive in UI

Open dubreuia opened this issue 4 years ago • 3 comments

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

dubreuia avatar Jun 12 '20 13:06 dubreuia

Also make sure existing users gets one of the checkbox selected to false.

dubreuia avatar Jun 12 '20 13:06 dubreuia

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 😱

SaltyAimbOtter avatar Jan 11 '21 19:01 SaltyAimbOtter

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.

dubreuia avatar Jan 17 '21 18:01 dubreuia