[Freeipa-devel] Proposed Javascript coding standards

Adam Young ayoung at redhat.com
Mon Sep 13 19:53:56 UTC 2010


On 09/13/2010 03:33 PM, Endi Sukma Dewata wrote:
> Hi Adam,
>
> ----- "Adam Young"<ayoung at redhat.com>  wrote:
>    
>> https://fedorahosted.org/freeipa/wiki/Javascript_Coding_Standards
>>      
> Whitespace: Do we put a space in function definition between the () and {}?
>    function(){...}
> vs.
>    function() {...}
> Or does it matter?
>    

I say lets go with the first.


> Compound statement: This is probably Python syntax.
> if foo == 'blah':
>      do_blah_thing()
>    

Fixed.  Thanks

> Comments: Should use // or /* ... */ instead of #.
>    

Yep.  Also, we should only use // to comment out lines, as a regex can 
casue premature end of comment-out.

/* .... */ will be reserved for documenting comments

> Thanks!
>
> --
> Endi S. Dewata
>
>    
>> _______________________________________________
>> Freeipa-devel mailing list
>> Freeipa-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/freeipa-devel
>>      




More information about the Freeipa-devel mailing list