RubyMine Code inspection doesn't find references to model fields for hundreds of warnings
I get countless warnings when I run code inspection because objects and references created by the Page Object and Fig Newton gems are not recognized.
Please sign in to leave a comment.
Hi,
I can suggest you to look at our side-project https://github.com/JetBrains/ruby-type-inference which tries to overcome such situations. By running your code with special tracer you add your custom defs into your own database to be used by RubyMine later. We have not released it yet, but we are close to our first EAP of this plugin.
Thank you for your insights.
Valentin.
Could you please share more details? what kind of application is it? do you use Bundler and are all gems installed to the project? Please attach idea.log (Help | Show Log in...) and the screenshot of inspection tooltip?
Hi,
We have a Test Automation Framework that uses Cucumber, Watir and PageObjects.
We use Bundler and all gems are up to date.
I cannot upload the log file, it says only image files.
Here is the snapshot requested:

@Jkoelewyn,
sorry for the delay. Would it be possible to provide a project sample for reproduce? In addition, have you tried the last RubyMine 2017.3 EAP?
I just upgraded to 2017.3 EAP and ran the inspection. I still get the same result/
What exactly do you want in a project sample? I would have to create something without proprietary info in it...
But I guess for this purpose just a single page object class file would be good enough?
I will also note that after the upgrade I can no longer delete (exclude) segments of the code inspection
One more, we have several situations where a variable is set in a conditional (if/else or case) where the final segment (the else) is a Fail condition (ie test stops). We then get a warning that our variable can be uninitialized. Which is not really true.
For example:
Also, the logic on Unnecessary return statements is not right
It'd be great if you could provide a working project sample so that I can reproduce the problem (you can send me it to rubymine-support@jetbrains.com)
I will scrub a sample for you. Does it need to run? Or just show the issues when inspected?
It should be a working project sample.
I sent a paired down project with plenty of examples.
To send any more we would have to get NDAs all over the place.
Did you get the file I sent?
I see no tickets from your user in our system, could you please send again at least a test message to rubymine-support@jetbrains.com
See #1128897