question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Settings in "Local variable or parameter can be final" are ignored for checks

See original GitHub issue

It seems that the save actions plugin doesn’t respect the inspection settings when checking if a variable can be final. This currently creates a problem with Lombok val values, because those are implicitly final and the behavior in IntelliJ 2018.1. regarding implicit finals changed:

  1. If “Save Actions” doesn’t respect inspection settings, then it must be fixes as it people would expect that their settings do work. Has nothing to do with choosing the desired default: the default here was chosen to keep the old behaviour unchanged (as people tend to complain when after update they get new warnings on the old code from old inspections)

IntelliJ that lead to the changed behavior: https://youtrack.jetbrains.com/oauth?state=%2Fissue%2FIDEA-182740

lombok-intellij plugin issue: https://github.com/mplushnikov/lombok-intellij-plugin/issues/469

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:8
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dubreuiacommented, Jul 13, 2018

Hey @kossmoboleat, yes I did, but I won’t have time to implement the correction anytime soon. I’m pretty sure it requires me to update the SDK to 2018.1, which by itself isn’t a problem, but I’m two years behind… (current 2016.1)

Any help and PR are gladly welcomed. See the README for information on how to contribute

I understand this is also a request for Java, see recent issue #168.

0reactions
dubreuiacommented, Sep 11, 2020

Hello everybody, is this still present? Closing the issue, please reopen if it is the case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why would one mark local variables and method parameters ...
The parameters are not final since we have a Checkstyle-Check which checks for reassigning parameters.
Read more >
FinalLocalVariableCheck (checkstyle 10.5.0 API)
Checks that local variables that never have their values changed are declared final. The check can be configured to also check that unchanged...
Read more >
Code Inspection 'Local variable or parameter can be final ...
Code Inspection 'Local variable or parameter can be final' doesn't show up with "try-with-resources".
Read more >
marking parameters and local variables as final
Method parameters and local variables should not be declared final unless it improves readability or documents an actual design decision. Fields ...
Read more >
Warning Options (Using the GNU Compiler Collection (GCC))
Warn whenever a constant static variable is unused aside from its declaration. -Wunused-const-variable=1 is enabled by -Wunused-variable for C, but not for C++....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found