[HTTPS-Everywhere] Coding Standards

Micah Lee micah at eff.org
Thu Aug 22 17:26:11 PDT 2013


On 08/20/2013 10:02 AM, Pavel Kazakov wrote:
> Hi,
> 
> There are a number of coding style inconsistencies for some of the
> existing code, so I wanted to get some thoughts on potentially
> adopting a coding standard for HTTPS Everywhere. I've noticed there is
> currently an issue
> (https://trac.torproject.org/projects/tor/ticket/9293) to standardize
> function names. Choosing a style for tabs/spaces would also be great.
> We could also extend this idea further and adopt jsdoc/unit testing
> frameworks.
> 
> I understand there may be good reasons for avoiding a rigid standard,
> and this wouldn't have to be a high priority item, but I just wanted
> to throw out an idea.
> 
> Regards,
> Pavel (nullishzero)

I definitely like the idea of at least sticking with a consistent naming
convention and a consistent tab/space style.

I like everything mentioned in
http://javascript.crockford.com/code.html, except I prefer 2 spaces
indenting rather than 4 spaces.

We could some also try to adopt something like jsdoc, but I think the
immediate (lowish priority) problem is that a lot of the code is really
sloppy.

If we decide on coding styles we want to use for the project, maybe we
should add it to the readme and work on updating all of our code.

I sure wish we had unit tests to prevent style updates from breaking
anything.

-- 
Micah Lee
Staff Technologist
Electronic Frontier Foundation
https://eff.org/join
@micahflee

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 897 bytes
Desc: OpenPGP digital signature
URL: <http://lists.eff.org/pipermail/https-everywhere/attachments/20130822/67c1929a/attachment.sig>


More information about the HTTPS-everywhere mailing list