[HTTPS-Everywhere] Coding Standards

Pavel Kazakov nullishzero at gmail.com
Tue Aug 27 18:55:21 PDT 2013


Hey Micah,

Thanks for the reply.

The crockford site's coding standard looks good, although I also
prefer 2 spaces. I'd be more than happy to help with any code clean up
tasks.

I've been working on an additional Firefox extension that 'attaches'
to HTTPS Everywhere and runs integration tests (my time has been
rather limited, so development isn't go as fast as I had hoped). The
main motivator was to allow automated testing of rulesets against live
websites--open a link with HTTPS Everywhere disabled and once with
HTTPS Everywhere enabled, and look for differences/breakage. The
extension could probably be updated to run unit tests.

Regards,
Pavel

On Thu, Aug 22, 2013 at 5:26 PM, Micah Lee <micah at eff.org> wrote:
> 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
>
>
> _______________________________________________
> HTTPS-everywhere mailing list
> HTTPS-everywhere at mail1.eff.org
> https://mail1.eff.org/mailman/listinfo/https-everywhere


More information about the HTTPS-everywhere mailing list