-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add style guide and formatting information #11669
Conversation
Updates CONTRIBUTING.md with style guide links for the engine languages, as well as a note about auto-formatting.
I'm not familiar with the Android code, so I don't know how true it is that we follow Google style there; maybe someone should weigh in on that aspect. (For C++/ObjC it's definitely not 100%, but for most of the code I've seen we are close enough that applying it more completely in the future wouldn't be a significant inconsistency.) |
[Objective-C++](https://google.github.io/styleguide/objcguide.html#objective-c)) | ||
- [Java](https://google.github.io/styleguide/javaguide.html) | ||
|
||
C++ and Objective-C/C++ files are formatted with `clang-format`, and GN files with `gn format`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should clarify that clang-format
must be invoked with the -file
argument so that it picks up the .clang-format
specification. By default, I don't think it respects the nearest .clang-format
file. Also, mention that both clang-format
and gn
must be picked from either buildtools
or third_party/gn
so that folks don't end up using disparate versions of auto-formatter which may have slightly differing opinions on the same format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was intending this to be advisory, rather than full instructions. I think if we want detailed instructions we should probably put them on another page and link to them from this sentence. Inlining instructions that work for all platforms would probably be more text than the page currently has...
git@github.com:flutter/engine.git/compare/e7f9ef6aa0b9...cd92039 git log e7f9ef6..cd92039 --no-merges --oneline 2019-09-04 mouad.debbar@gmail.com Handle new navigation platform messages (flutter/engine#11880) 2019-09-04 shihaohong@google.com Android 10+ View.getSystemGestureExclusionRects (flutter/engine#11451) 2019-09-04 aukwat@gmail.com Fix deleting Thai vowel bug on iOS (skip string range sanitization) (flutter/engine#11807) 2019-09-04 bkonyi@google.com Roll src/third_party/dart 4bd13a74d9..c3db2e3ee0 (4 commits) 2019-09-04 skia-flutter-autoroll@skia.org Roll src/third_party/skia c2dc9c864844..e7366841663b (2 commits) (flutter/engine#11878) 2019-09-04 iska.kaushik@gmail.com [flutter_runner] Add common libs to the test far (flutter/engine#11875) 2019-09-04 bkonyi@google.com Roll src/third_party/dart fd27e795ba..4bd13a74d9 (5 commits) 2019-09-04 aam@google.com Provide dart vm initalize isolate callback so that children isolates belong to parent's isolate group. (flutter/engine#9888) 2019-09-04 stuartmorgan@google.com Add style guide and formatting information (flutter/engine#11669) 2019-09-04 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from BR_-u... to LKWtB... (flutter/engine#11874) 2019-09-04 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/mac-amd64 from dRCdb... to m-hNV... (flutter/engine#11873) 2019-09-04 skia-flutter-autoroll@skia.org Roll src/third_party/skia 77743492418e..c2dc9c864844 (22 commits) (flutter/engine#11872) 2019-09-04 iska.kaushik@gmail.com Add a sample unit test target to flutter runner (flutter/engine#11847) 2019-09-04 iska.kaushik@gmail.com Support building standalone far packages with autogenerating manigests (flutter/engine#11849) 2019-09-04 bkonyi@google.com Roll src/third_party/dart 622747502e..fd27e795ba (9 commits) 2019-09-04 bkonyi@google.com Roll src/third_party/dart 54fdd559d8..622747502e (1 commits) 2019-09-04 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from KqidK... to BR_-u... (flutter/engine#11845) 2019-09-04 skia-flutter-autoroll@skia.org Roll src/third_party/skia 452ce044f0db..77743492418e (12 commits) (flutter/engine#11837) 2019-09-04 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/mac-amd64 from -kKi5... to dRCdb... (flutter/engine#11840) 2019-09-04 bkonyi@google.com Roll src/third_party/dart 36985859e4..54fdd559d8 (65 commits) 2019-09-04 chinmaygarde@google.com Minor tweaks to the Doxygen theme. (flutter/engine#11576) 2019-09-04 matthew-carroll@users.noreply.github.com Updated API usage in scenario app by deleting unnecessary method. (flutter/engine#11844) 2019-09-03 garyq@google.com Fix RTL justification alignment with newline (flutter/engine#11842) 2019-09-03 matthew-carroll@users.noreply.github.com Rename first frame method and notify FlutterActivity when full drawn (#38714 #36796). (flutter/engine#11357) 2019-09-03 skia-flutter-autoroll@skia.org Roll src/third_party/skia 8050d94ae227..452ce044f0db (1 commits) (flutter/engine#11834) 2019-09-03 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/linux-amd64 from a8wlq... to KqidK... (flutter/engine#11833) 2019-09-03 skia-flutter-autoroll@skia.org Roll fuchsia/sdk/core/mac-amd64 from pVy4h... to -kKi5... (flutter/engine#11832) 2019-09-03 skia-flutter-autoroll@skia.org Roll src/third_party/skia 033c4014b788..8050d94ae227 (2 commits) (flutter/engine#11831) 2019-09-03 skia-flutter-autoroll@skia.org Roll src/third_party/skia 94c66475560d..033c4014b788 (2 commits) (flutter/engine#11830) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC franciscojma@google.com on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
Updates CONTRIBUTING.md with style guide links for the engine languages, as well as a note about auto-formatting.
Addresses flutter/flutter#39442