Support for Struct?

In this version of RubyMine:

Screen Shot 2014-09-18 at 2.14.56 PM.png

I have this Struct definition:

Screen Shot 2014-09-18 at 2.16.13 PM.png

and I'm getting this sytax suggestion (red underline):

Screen Shot 2014-09-18 at 2.19.12 PM.png

is this a bug where RubyMine doesn't understand Struct, or am I actually using Struct incorrectly?

9 comments
Comment actions Permalink

Is this something considered for improvement?
The warnings are quite noisy. Is there any way to mute them locally?

0
Comment actions Permalink

Hello, Thomas,

I'm planning fix it soon.

Also you can disable the inspection "Incorrect call argument count" (Settings | Editor | Inspections | Ruby | Incorrect call argument count) to remove the error highlighting.

Sorry for inconvenience.

0
Comment actions Permalink

Great to hear! I just wanted to check in on the status.

I know I can turn of types of errors like you describe, but that affect all errors. Is there any way to locally disable - like you can in C++ with @pragma comments? Given that there will always be situations where one get false positives due to Ruby's organic nature - or, that one are dealing with an API that doesn't always comply? Cases where one generally want to see the errors, but a few cases should be ignored.
I find that it's nice to be able to keep the warning status green - as I can then quickly glance to it to see if I introduced anything.

0
Comment actions Permalink

Hello, Thomas,

please try to suppress this inspection as descibed in the documentaion - https://www.jetbrains.com/idea/help/suppressing-inspections.html

Does it work for your case?

0
Comment actions Permalink

I don't seem to have any option to suppress it locally.
2015-06-24_19h09_14.png
I know I can supress it globally, but that's not desired as the warnings are generally useful except for some false positives.

0
Comment actions Permalink

Have you tried to press Alt+Enter standing exact on the error?

0
Comment actions Permalink

Yes, that gives me the same menu. (RubyMine 7.1.2)

0
Comment actions Permalink

Unfotunately, I don't know another way to disable inspection partually. Anyway, I'm planning to fix it soon.

Sorry for inconvinience.

0

Please sign in to leave a comment.