Hi, Over the past year, I have converted a few directories (xpcom/, docshell/, embedding/) to Gecko style using a patched Clang-Format and a few other tools.
On 17 June 2015 at 18:57, Gregory Szorc <g...@mozilla.com> wrote: > First thing is first: what are the blockers to mass rewriting > mozilla-central with clang-format's output? Here are a few diffs after running Clang-Format on a few recently Gecko style-ified directories: With my patched Clang-Format: https://gist.github.com/poiru/d10dfa978f351f20e975 With upstream Clang-Format: https://gist.github.com/poiru/c7d1aaf9e83bb653dc37 The patched Clang-Format produces reasonably good output, although there are still a couple of blockers (e.g. BEGIN/END macro indentation and class base clause indentation). If we want to seriously do this (and I'm all for it), I can work on getting those blockers fixed and upstreaming my patches. Note that Clang-Format will still produce changes that are not strictly necessary, but that is mostly a one-time cost and something we should just live with anyway. Automatic formatting is worth it. On 17 June 2015 at 10:07, Gregory Szorc <g...@mozilla.com> wrote: > If so, perhaps we can find time in Whistler next week to > better integrate clang-format into the development workflow. I'd be more > than happy to help. +1 for talking about this in Whistler. I actually think the workflow integration is a more important issue at our scale. If developers are to use Clang-Format, we need to ensure that they all use the same version (as different versions may produce slightly different output) and that they all remember to run it for each commit. I introduced Clang-Format at my last workplace and even with a small team we bumped into both of those issues frequently. Cheers, Biru _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform