Style guide: Add sections for Java, Objective-C/C++, and Python
They're just pointers to the corresponding Chromium or Google style guides. BUG=none NOTRY=true Change-Id: Ib808db1cc4fc4d8a4ea708e6ec1c92d6d219b78e Reviewed-on: https://chromium-review.googlesource.com/657419 Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Kári Tristan Helgason <kthelgason@webrtc.org> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Reviewed-by: Niels Möller <nisse@chromium.org> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org> Cr-Commit-Position: refs/heads/master@{#19758}
This commit is contained in:
parent
1359744d72
commit
241d7107b2
@ -1,5 +1,15 @@
|
||||
# WebRTC coding style guide
|
||||
|
||||
## General advice
|
||||
|
||||
Some older parts of the code violate the style guide in various ways.
|
||||
|
||||
* If making small changes to such code, follow the style guide when
|
||||
it’s reasonable to do so, but in matters of formatting etc., it is
|
||||
often better to be consistent with the surrounding code.
|
||||
* If making large changes to such code, consider first cleaning it up
|
||||
in a separate CL.
|
||||
|
||||
## C++
|
||||
|
||||
WebRTC follows the [Chromium][chr-style] and [Google][goog-style] C++
|
||||
@ -10,14 +20,6 @@ both.
|
||||
[chr-style]: https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/c++/c++.md
|
||||
[goog-style]: https://google.github.io/styleguide/cppguide.html
|
||||
|
||||
Some older parts of the code violate the style guide in various ways.
|
||||
|
||||
* If making small changes to such code, follow the style guide when
|
||||
it’s reasonable to do so, but in matters of formatting etc., it is
|
||||
often better to be consistent with the surrounding code.
|
||||
* If making large changes to such code, consider first cleaning it up
|
||||
in a separate CL.
|
||||
|
||||
### ArrayView
|
||||
|
||||
When passing an array of values to a function, use `rtc::ArrayView`
|
||||
@ -46,6 +48,25 @@ pre-dates the use of the current C++ style guide for this code base.
|
||||
* If making large changes to C code, consider converting the whole
|
||||
thing to C++ first.
|
||||
|
||||
## Java
|
||||
|
||||
WebRTC follows the [Google Java style guide][goog-java-style].
|
||||
|
||||
[goog-java-style]: https://google.github.io/styleguide/javaguide.html
|
||||
|
||||
## Objective-C and Objective-C++
|
||||
|
||||
WebRTC follows the
|
||||
[Chromium Objective-C and Objective-C++ style guide][chr-objc-style].
|
||||
|
||||
[chr-objc-style]: https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/objective-c/objective-c.md
|
||||
|
||||
## Python
|
||||
|
||||
WebRTC follows [Chromium’s Python style][chr-py-style].
|
||||
|
||||
[chr-py-style]: https://chromium.googlesource.com/chromium/src/+/HEAD/styleguide/styleguide.md#python
|
||||
|
||||
## Build files
|
||||
|
||||
The WebRTC build files are written in [GN][gn], and we follow
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user