`git cl format` should remove braces around single-line clauses |
||||
Issue descriptionA lot of reviewers nit and tell other to remove braces around single-line clauses. I personally prefer braces for safety (*ahem* goto: fail) and clarity, but consistency is more important. The style guide considers them optional, but so many reviewers comment on it that it might as well be required. Developers should not need to think about stuff like this; that's the whole point of `git cl format`. Therefore, I propose that `git cl format` should just pick the common convention and apply it.
,
Mar 9 2017
+1 to not needing to think about this!
,
Mar 9 2017
Before we change the tool, we'd need agreement to change the style guide and policy. We can't enforce a not-agreed upon policy. To address that, I think you'd need to write a proposal to the folks who are responsible for the style guide?
,
Mar 13 2017
> To address that, I think you'd need to write a proposal to the folks who are responsible for the style guide? My proposal is reviewers should stop bothering me to remove braces as long as the style guide doesn't require it. :-P Is there a "developer productivity" person/team I can ask to take this on? If not, what's the least time-consuming way to submit a proposal to those folks?
,
Nov 14 2017
Aaron, do you have any thoughts on this?
,
Nov 16 2017
git-cl-format is literally just "find the list of modified files, find the clang-format binary, run clang-format on those files". git-cl-format does not have any control over what kind of formatting is done, what style rules are adhered to, or anything like that. All of that is controlled by the .clang-format files in each repo: https://cs.chromium.org/search/?q=.clang-format&sq=package:chromium That file delegates basically all decisions to clang-format's built-in "Chromium" style, which is defined in the clang-format repo itself. As far as I know, any chrome developer is welcome to propose changes to that file either via a CL or via a proposal on chromium-dev@.
,
Dec 1 2017
lgarron isn't working on Chrome anymore, but someone else might want to pick this up.
,
Dec 3
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
||||
►
Sign in to add a comment |
||||
Comment 1 by lgar...@chromium.org
, Mar 9 2017