Recognizing the use of YUI for inspections
I'm evaluating RubyMine and so far I'm impressed! I do have a newbie question that is frustrating me, though:
I am using YUI, and in my code I have:
YUI().use('node', ....
This is flagged as a warning "Unknown function or method". I see from the list of features that YUI is supported, so I assume I can somehow tell it that I'm using YUI.
And, as a somewhat larger issue, if I create my own library, can I somehow register my functions so that an error isn't thrown?
Please sign in to leave a comment.
Hello Paul,
Most likely this is a result of a lack of sources of YUI, and request is related to: http://youtrack.jetbrains.net/issue/RUBY-4344.
What bindings do you use with YUI?
Regards,
Oleg
Yes, I don't have the YUI sources locally. The only indication that I'm using YUI is this in the layout file:
<script type="text/javascript" charset="utf-8" src="http://yui.yahooapis.com/3.2.0/build/yui/yui-min.js"></script>
Is that what you were asking?
So, it sounds like this is a known issue. Is there a way to communicate with RubyMine that it shouldn't mark the symbol YUI as undefined?
jslint allows the comment:
/*global YUI */
Is there some similar mechanism?
Unfortunatelly RubyMine doesn't have any mechanism yet. Feel free to vote for the mentioned feature request.
Regards,
Oleg