--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
I would like to get to a point where "git cl format" runs as part of presubmit, eliminating virtually all current overhead that formatting imposes on CL authors and reviewers.What do people see as the blockers to such a change? I am motivated to enable this change to happen, as I think that it would be a huge productivity win for Chromium development.
+1 to Peter's comment. It seems that clang-format is close, but not quite there. i.e. in recent weeks we have seen it format code in unnatural ways (i.e. starting a line with OVERRIDE,
On Mon, Apr 28, 2014 at 5:25 PM, John Abd-El-Malek <j...@chromium.org> wrote:
+1 to Peter's comment. It seems that clang-format is close, but not quite there. i.e. in recent weeks we have seen it format code in unnatural ways (i.e. starting a line with OVERRIDE,This is fixed in the clang-format binary used in chromium.
How do you know they're all due to clang-format?
On Mon, Apr 28, 2014 at 6:05 PM, Nico Weber <tha...@chromium.org> wrote:
How do you know they're all due to clang-format?
The last patchset is "undo git cl format changes" :)
Do we typically ask developers go back and fix their style mistakes? We check in incorrect formatting all the time. I'm not feeling very creative, but a quick search turns up things like 6 space indents for wrapped lines, unnecessary double spaces, and an incorrectly indented private: label. In most of these cases, wouldn't we just let the next developer that touches these lines fix them?As for the specific example you linked, I'm not sure there would be much more than that one-time churn. From what I can see, it tried to align most things, but even lines that are only slightly longer didn't get realigned (DIR_MANAGED_USERS_DEFAULT_APPS). But even this is something we could disable if we wanted (see AlignTrailingComments on http://clang.llvm.org/docs/ClangFormatStyleOptions.html).
I've run in to a few annoyances along the way with what clang-format generates. The good news is, when I followed the instructions and filed bugs using this link, thakis@, nick@, djasper@ and others have been really responsive and helpful. All of the bugs I've filed have had a good outcome; sometimes I just learned something about the style guide.
== How well did the old == version of clang-format do? 47.49% commits were completely clang-format "clean" according to the old version. This metric is an indicator of either clang-format matching the prevailing style (which is more likely to happen with smaller CLs), or people using clang-format as part of their workflow. Between 78.11% and 86.58% of all committed lines (depending on how you count -- the lower bound is very conservative) were clang-format "clean" according to the old version. This metric is an indicator of the deviations between prevailing style and the auto-formatting of clang-format.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
As a compromise, can we use it as a style checker, i.e. running right after upload and report results to retveild (like WebKit's style bot)?