|
|
Created:
7 years, 3 months ago by Nico Modified:
6 years, 11 months ago CC:
blink-reviews, dglazkov+blink, eae+blinkwatch Base URL:
svn://svn.chromium.org/blink/trunk Visibility:
Public. |
DescriptionAdd a .clang-format file to Blink.
This way, a recent clang-format will use the correct style without that the
user has to pass an explicit -style parameter.
BUG=none
NOTRY=true
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=165335
Patch Set 1 #
Messages
Total messages: 27 (0 generated)
Drive-by LGTM, since I was just looking for documentation on exactly this. :)
On 2013/09/03 08:06:35, Use mkwst_at_chromium.org plz. wrote: > Drive-by LGTM, since I was just looking for documentation on exactly this. :) (Doesn't really work in practice yet: http://llvm.org/bugs/show_bug.cgi?id=17072 But I'm guessing that will be fixed.)
Can we put this in the Source directory rather than the root directory of the repo?
On 2013/09/03 20:58:34, abarth wrote: > Can we put this in the Source directory rather than the root directory of the > repo? Then it won't apply to stuff in public/
On 2013/09/03 21:01:29, Nico wrote: > On 2013/09/03 20:58:34, abarth wrote: > > Can we put this in the Source directory rather than the root directory of the > > repo? > > Then it won't apply to stuff in public/ The code in public/ has a bunch of more specific style rules that are different from Source. For example, class names start with Web and enums reiterate their type name in their values...
On 2013/09/04 00:42:08, abarth wrote: > On 2013/09/03 21:01:29, Nico wrote: > > On 2013/09/03 20:58:34, abarth wrote: > > > Can we put this in the Source directory rather than the root directory of > the > > > repo? > > > > Then it won't apply to stuff in public/ > > The code in public/ has a bunch of more specific style rules that are different > from Source. For example, class names start with Web and enums reiterate their > type name in their values... clang-format only does whitespace formatting (for WebKit style, it checks that {} are in the right place, indent is correct, linebreaks are before operators, etc). These rules are shared by public/ and Source/.
(but if you want, I can add two identical .clang-format files of course. What's the concern with a toplevel file? It's hidden, so it won't show up in ls output by default.)
I'm not super excited about having this file in the root directory. If we head down this path, we might also include vim and emacs indent config files (e.g., http://trac.webkit.org/browser/trunk/.dir-locals.el). If a lot of people plan to use this file, then it might make sense, but if it's just a niche thing then it's 99% noise for 1% value.
On Tue, Sep 3, 2013 at 5:54 PM, <abarth@chromium.org> wrote: > I'm not super excited about having this file in the root directory. If we > head > down this path, we might also include vim and emacs indent config files > (e.g., > http://trac.webkit.org/**browser/trunk/.dir-locals.el<http://trac.webkit.org/...). > If a lot of people plan > to use this file, then it might make sense, but if it's just a niche thing > then > it's 99% noise for 1% value. > So you prefer to copies of this, one in Source/, one in public/? (I think the editor comparison isn't quite appropriate, since a) there are many different editors, but we'll end up with at most 1 accepted source formatter (might be 0 too though) b) everyone configures their editor to at least some amount, so it's not too hard to tell it to look for project-specific editor configuration in some other place, which clang-format is supposed to Just Work) > > https://codereview.chromium.**org/23503027/<https://codereview.chromium.org/2... > To unsubscribe from this group and stop receiving emails from it, send an email to blink-reviews+unsubscribe@chromium.org.
On 2013/09/04 00:58:51, Nico wrote: > So you prefer to copies of this, one in Source/, one in public/? I don't think we should have this file in the tree at this time. If clang-format becomes popular and is used by the majority of contributors, then it might make sense to add something like this. Currently, it seems like a niche feature.
On Tue, Sep 3, 2013 at 6:12 PM, <abarth@chromium.org> wrote: > On 2013/09/04 00:58:51, Nico wrote: > >> So you prefer to copies of this, one in Source/, one in public/? >> > > I don't think we should have this file in the tree at this time. If > clang-format becomes popular and is used by the majority of contributors, > then > it might make sense to add something like this. Currently, it seems like a > niche feature. > While http://llvm.org/bugs/show_bug.cgi?id=17072 is open, that's definitely fair. After that, I disagree, but we can discuss this more then. > > > https://codereview.chromium.**org/23503027/<https://codereview.chromium.org/2... > To unsubscribe from this group and stop receiving emails from it, send an email to blink-reviews+unsubscribe@chromium.org.
In the interest of transparency: The same chance got committed in https://codereview.chromium.org/32673005 (without me knowing) by now. The llvm bug I said we should wait on before reconsidering did get fixed though. Closing this issue. If you feel strongly about it, I guess we can revert that other change and discuss it more first, or wait for http://crbug.com/240309 until landing it again. Maybe that's not needed though. Closing this cl!
Message was sent while issue was closed.
On 2013/10/31 20:18:12, Nico wrote: > Closing this issue. If you feel strongly about it, I guess we can revert that > other change and discuss it more first, or wait for http://crbug.com/240309 > until landing it again. Maybe that's not needed though. I think it's lame but I don't have the energy to fight it.
On Thu, Oct 31, 2013 at 1:29 PM, <abarth@chromium.org> wrote: > On 2013/10/31 20:18:12, Nico wrote: > >> Closing this issue. If you feel strongly about it, I guess we can revert >> that >> other change and discuss it more first, or wait for >> http://crbug.com/240309 >> until landing it again. Maybe that's not needed though. >> > > I think it's lame but I don't have the energy to fight it. > I don't want to land stuff that you think is lame. I want folks to be excited about clang-format. I'm happy to revert this for now without any fight and give this another try once clang-format is more obviously exciting (e.g. when it's easier to use, as right now it requires some amount of manual setup, at least for non-google-corp-image folks). > > https://codereview.chromium.**org/23503027/<https://codereview.chromium.org/2... > To unsubscribe from this group and stop receiving emails from it, send an email to blink-reviews+unsubscribe@chromium.org.
Message was sent while issue was closed.
On 2013/10/31 20:35:28, Nico wrote: > I don't want to land stuff that you think is lame. I want folks to be > excited about clang-format. I'm happy to revert this for now without any > fight and give this another try once clang-format is more obviously > exciting (e.g. when it's easier to use, as right now it requires some > amount of manual setup, at least for non-google-corp-image folks). Thanks, that would make me happy, but I'm also willing to believe I'm overreacting to the experience of having all these magic files in WebKit.
Message was sent while issue was closed.
On 2013/10/31 20:57:07, abarth wrote: > On 2013/10/31 20:35:28, Nico wrote: > > I don't want to land stuff that you think is lame. I want folks to be > > excited about clang-format. I'm happy to revert this for now without any > > fight and give this another try once clang-format is more obviously > > exciting (e.g. when it's easier to use, as right now it requires some > > amount of manual setup, at least for non-google-corp-image folks). > > Thanks, that would make me happy, but I'm also willing to believe I'm > overreacting to the experience of having all these magic files in WebKit. I think it's good to have a high bar for new toplevel files. Just lgtm https://codereview.chromium.org/54203005/ and it's gone.
Message was sent while issue was closed.
Hi abarth, I'd like to reopen this discussion. clang-format is now in the PATH of everyone with a chromium checkout (which includes everyone with a blink checkout, as blink can't build stand-alone), and the `git cl format` command will work for everyone. We have a wiki page at https://code.google.com/p/chromium/wiki/ClangFormat and would like to announce these changes to the email lists next week. Is this enough for adding this file? Or would you prefer if we only announce it for chromium for now and see how adoption goes before adding a .clang-format file to blink?
Message was sent while issue was closed.
Ok. I'm not super excited about it, but I think the cost is also very small.
Cool, thanks. I hope you'll be super excited once you've used it a bit :-)
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/23503027/1
…can you lg please, abarth? ** Presubmit ERRORS ** Missing LGTM from an OWNER for these files: .clang-format
Lgtm On Friday, January 17, 2014, <thakis@chromium.org> wrote: > …can you lg please, abarth? > > ** Presubmit ERRORS ** > Missing LGTM from an OWNER for these files: > .clang-format > > https://codereview.chromium.org/23503027/ > To unsubscribe from this group and stop receiving emails from it, send an email to blink-reviews+unsubscribe@chromium.org.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/23503027/1
Retried try job too often on win_blink_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_blink_...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/23503027/1
Message was sent while issue was closed.
Change committed as 165335 |