Off-the-shelf automated tools are not going to solve our formatting woes.
Both the JS engine and Gecko mandate very particular patterns. I ended up
writing a custom python tool to reformat XPConnect a few years ago [1]
because none of the tools were configurable enough.

I think detailed style guides are hugely important, because developers have
a spec to code to, and don't have to try to read the reviewer's mind. In
SpiderMonkey, there's been a push to document the outcome of every style
discussion in the style guide. The SM style guide now has a lot of detail
on how these edge cases should be handled (see [2]), and I find it very
helpful.

On this issue specifically - email seems to be garbling the alignment of
the proposals (at least for me). Can anyone with a proposal (baku, Ms2ger)
resend it as a pastebin?

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=688012
[2]
https://wiki.mozilla.org/JavaScript:SpiderMonkey:C_Coding_Style#Other_whitespace


On Thu, Dec 19, 2013 at 8:33 AM, Martin Thomson <m...@mozilla.com> wrote:

> If we are talking about checking (a separate thing, in my opinion), then
> we should be talking about linting :)  Checking for formatting is probably
> less useful than something more concrete.  Having run jshint over some of
> the code, I was horrified at the output it produced.
>
> That said, checking formatting in general is a massive waste of time.  If
> we had an automated tool, then I could notice a problem, then say "did you
> run {clang-format,astyle,js-beautify}", but generally not worry about
> formatting.
>
> ----- Original Message -----
> From: "Till Schneidereit" <t...@tillschneidereit.net>
> To: "Ehsan Akhgari" <ehsan.akhg...@gmail.com>
> Cc: "Mike Hommey" <m...@glandium.org>, dev-platform@lists.mozilla.org,
> "Andrea Marchesini" <amarches...@mozilla.com>
> Sent: Thursday, December 19, 2013 8:11:39 AM
> Subject: Re: style guide proposal
>
> [...]
>
> I think we should increase the checking we do, and make it a habit to run
> the checks before try-servering or putting a patch up for review. It's
> really not a good investment of anyone's time to have to deal with trailing
> whitespace during a review.
>
> [1]:
>
> http://mxr.mozilla.org/mozilla-central/source/js/src/config/check_spidermonkey_style.py
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to