Ruby is a particularly dynamic language even amongst others of its kind, we get it. This offers us great flexibility but is also the source of many mistakes, and RubyMine helps us avoid these mistakes with intelligent source code analysis and error highlighting. That's good.
I have a firm belief, however, that RubyMine (or any other source code analysis tool, for that matter) should never throw a false positive. It's ok to miss some problems, but it's definitely not ok to highlight correct code as a problem. I need the confidence to know that if RubyMine is telling me something is wrong, I have to look at it -- I shouldn't ignore warnings.
Currently, RubyMine highlights way too many false positives. Most warnings in my project are in fact false positives, and I've reported numerous issues about it. Here's a few suggestions that I believe would greatly reduce the number of false positives, if not eliminate them:
- If RM can't infer the type of an object, don't highlight any messages sent to this object as an error/warning.
- If RM does know the object type, but this type has method_missing defined, don't highlight any messages sent to this object as an error/warning.
- The second rule could be tightened for a few classes with known method_missing patterns, like ActiveRecord::Base.
If RubyMine keep throwing all these false positives, the user is going to loose confidence, sooner or later. He will sooner or later loose the patience to look at all those warnings, and just ignore them. When this happens, RubyMine looses it's usefulness. Don't let this happen, please.