I bet you’ll agree with me that dealing with legacy code is not a pleasant task. Almost like cleaning up an old storage room full of dust and garbage. Even if you have powerful inspections that tell you what’s going wrong, you still have to run them manually and then apply quick-fixes one by one on every of the errors you have found. We don’t like mundane tasks like that, and that’s why in the new IntelliJ IDEA 14 EAP build we’re adding the new Code Cleanup feature that automatically fixes your code for you, in one click instead of dozen.

To use the feature, simply go to Analyse → Code Cleanup… menu. You’ll get a simple dialog where you specify the scope of project files that you want analyzed and fixed, and the inspection profile to use for that.

You can change the list of used inspections by clicking the button next to the inspection profile selector.

When you come across an corresponding issue in the editor, IntelliJ IDEA offers you to run the Code Cleanup over the entire file right from there.

And, of course, you will be prompted to clean your code up before committing changes to a VCS.

Been using and loving IntelliJ since at least the 4.x version, but I won’t pay for an upgrade to 14 until you guys release a non-beta version of 13 first. Obviously 13.1.4 isn’t that, since it’s broken for Grails project creation. And the earlier 13.x versions lock up X-Windows on occasion and are very consistent when it comes to saving files on losing focus.

It’s the first time I ever regretted an IntelliJ upgrade. And that seems to be a pretty common sentiment online. Please fix the 13.x product line so that I’ll have enough faith to shell out another $100 this year.