[Freeipa-devel] [PATCH] 0074 jslint cleanup

Adam Young ayoung at redhat.com
Wed Nov 3 18:20:04 UTC 2010


On 11/03/2010 01:15 PM, Endi Sukma Dewata wrote:
> On 11/3/2010 9:10 AM, Adam Young wrote:
>>> The IPA and ipa_cmd are defined twice.
>>>
>>> +var IPA;
>>> +var ipa_cmd;
>>>
>>> +var IPA = ( function () {
>>> function ipa_cmd(name, args, options, win_callback, fail_callback,
>>> objname)
>
>> Fixed
>
> The duplicate IPA declaration is fixed, but the ipa_cmd is still
> declared twice:
>
> var ipa_cmd;
>
> function ipa_cmd( ... ) { ... }
>
> Is var ipa_cmd really necessary? We could also do this if we have to:
>
> var ipa_cmd;
>
> ipa_cmd = function( ... ) { ... };
>
> But is there anything wrong with just the plain function declaration?
>

Note the comment about "Forward declared"
jslint complains if there is no forward declaration.  I've postponed 
moving ipa_cmd into the IPA namespace in this patch, as that will cause 
a ripple effect through the rest of the .js files.




More information about the Freeipa-devel mailing list