|
|
DescriptionAdd C++ style guide to repo.
This is a Markdown conversion of https://www.chromium.org/developers/coding-style
This separates out the language-independent parts from the C++-specific parts.
The C++ portion is mostly the same as the web page with the following updates:
- New stuff at the top that references clang format and style update process.
- The sections on ?: and function parameter ordering were deleted. The advice was long and detailed and seems to contradict Clang format.
- Converted scoped_ptr to unique_ptr
- Removed the one-line section on return values vs out params as it didn't seem to add much.
- Removed the list of platform-specific ifdefs. Some were out-of-date, and "use the ones from build_config.h" seems sufficient for the style guide.
Committed: https://crrev.com/f0e606a5b56221da0b97ca0eda5bfc83332bdfdc
Cr-Commit-Position: refs/heads/master@{#403954}
Patch Set 1 #
Total comments: 5
Patch Set 2 : Comments fixed #
Total comments: 1
Messages
Total messages: 23 (9 generated)
brettw@chromium.org changed reviewers: + thakis@chromium.org
Description was changed from ========== Add C++ style guide to repo. This is a Markdown conversion of https://www.chromium.org/developers/coding-style This separates out the language-independent parts from the C++-specific parts. The C++ portion is mostly the same as the web page with the following updates: - New stuff at the top that references clang format and style update process. - The sections on ?: and function parameter ordering were deleted. The advice was long and detailed and seems to contradict Clang format. - Converted scoped_ptr to unique_ptr - Removed the one-line secion on return values vs out params as it didn't seem to add much. - Removed the list of platform-specific ifdefs. Some were out-of-date, and "use the ones from build_config.h" seems sufficient for the style guide. ========== to ========== Add C++ style guide to repo. This is a Markdown conversion of https://www.chromium.org/developers/coding-style This separates out the language-independent parts from the C++-specific parts. The C++ portion is mostly the same as the web page with the following updates: - New stuff at the top that references clang format and style update process. - The sections on ?: and function parameter ordering were deleted. The advice was long and detailed and seems to contradict Clang format. - Converted scoped_ptr to unique_ptr - Removed the one-line section on return values vs out params as it didn't seem to add much. - Removed the list of platform-specific ifdefs. Some were out-of-date, and "use the ones from build_config.h" seems sufficient for the style guide. ==========
The CQ bit was checked by brettw@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
jbroman@chromium.org changed reviewers: + jbroman@chromium.org
I hope you don't mind some drive-by review comments from me. https://codereview.chromium.org/2127713004/diff/1/styleguide/c++/c++.md File styleguide/c++/c++.md (right): https://codereview.chromium.org/2127713004/diff/1/styleguide/c++/c++.md#newcode8 styleguide/c++/c++.md:8: The exception for Blink style is missing here. Blink hasn't yet been reformatted to Chromium style, but this wording would lead me to believe that Blink code is written with Chromium style. https://codereview.chromium.org/2127713004/diff/1/styleguide/c++/c++.md#newco... styleguide/c++/c++.md:58: ``` ```c++ can be used to get C++ style highlighting in gitiles; several other .md files do this. https://codereview.chromium.org/2127713004/diff/1/styleguide/c++/c++.md#newco... styleguide/c++/c++.md:238: declare the param as `base::scoped_refptr<T>`. The caller can decide scoped_refptr is not in namespace base. https://codereview.chromium.org/2127713004/diff/1/styleguide/styleguide.md File styleguide/styleguide.md (right): https://codereview.chromium.org/2127713004/diff/1/styleguide/styleguide.md#ne... styleguide/styleguide.md:5: * [Chromium C++ style guide](https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md) Since this file is also in this repo, shouldn't a relative link be used? e.g. * [Chromium C++ style guide](c++/c++.md) https://codereview.chromium.org/2127713004/diff/1/styleguide/styleguide.md#ne... styleguide/styleguide.md:43: ## Web langauges (JavaScript, HTML, CSS) spelling: "languages"
rs-lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Comments fixed
Thanks, I addressed all of jbroman's comments.
The CQ bit was checked by brettw@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from thakis@chromium.org Link to the patchset: https://codereview.chromium.org/2127713004/#ps20001 (title: "Comments fixed")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Thanks, LGTM too.
Message was sent while issue was closed.
Description was changed from ========== Add C++ style guide to repo. This is a Markdown conversion of https://www.chromium.org/developers/coding-style This separates out the language-independent parts from the C++-specific parts. The C++ portion is mostly the same as the web page with the following updates: - New stuff at the top that references clang format and style update process. - The sections on ?: and function parameter ordering were deleted. The advice was long and detailed and seems to contradict Clang format. - Converted scoped_ptr to unique_ptr - Removed the one-line section on return values vs out params as it didn't seem to add much. - Removed the list of platform-specific ifdefs. Some were out-of-date, and "use the ones from build_config.h" seems sufficient for the style guide. ========== to ========== Add C++ style guide to repo. This is a Markdown conversion of https://www.chromium.org/developers/coding-style This separates out the language-independent parts from the C++-specific parts. The C++ portion is mostly the same as the web page with the following updates: - New stuff at the top that references clang format and style update process. - The sections on ?: and function parameter ordering were deleted. The advice was long and detailed and seems to contradict Clang format. - Converted scoped_ptr to unique_ptr - Removed the one-line section on return values vs out params as it didn't seem to add much. - Removed the list of platform-specific ifdefs. Some were out-of-date, and "use the ones from build_config.h" seems sufficient for the style guide. ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Add C++ style guide to repo. This is a Markdown conversion of https://www.chromium.org/developers/coding-style This separates out the language-independent parts from the C++-specific parts. The C++ portion is mostly the same as the web page with the following updates: - New stuff at the top that references clang format and style update process. - The sections on ?: and function parameter ordering were deleted. The advice was long and detailed and seems to contradict Clang format. - Converted scoped_ptr to unique_ptr - Removed the one-line section on return values vs out params as it didn't seem to add much. - Removed the list of platform-specific ifdefs. Some were out-of-date, and "use the ones from build_config.h" seems sufficient for the style guide. ========== to ========== Add C++ style guide to repo. This is a Markdown conversion of https://www.chromium.org/developers/coding-style This separates out the language-independent parts from the C++-specific parts. The C++ portion is mostly the same as the web page with the following updates: - New stuff at the top that references clang format and style update process. - The sections on ?: and function parameter ordering were deleted. The advice was long and detailed and seems to contradict Clang format. - Converted scoped_ptr to unique_ptr - Removed the one-line section on return values vs out params as it didn't seem to add much. - Removed the list of platform-specific ifdefs. Some were out-of-date, and "use the ones from build_config.h" seems sufficient for the style guide. Committed: https://crrev.com/f0e606a5b56221da0b97ca0eda5bfc83332bdfdc Cr-Commit-Position: refs/heads/master@{#403954} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/f0e606a5b56221da0b97ca0eda5bfc83332bdfdc Cr-Commit-Position: refs/heads/master@{#403954}
Message was sent while issue was closed.
i think the old guide had a "don't log" section that i pointed people at every now and then. is that still available somewhere?
Message was sent while issue was closed.
https://codereview.chromium.org/2127713004/diff/20001/styleguide/c++/c++.md File styleguide/c++/c++.md (right): https://codereview.chromium.org/2127713004/diff/20001/styleguide/c++/c++.md#n... styleguide/c++/c++.md:132: ## Logging Nico: This is what you're referring to I think. The logging advice should be unchanged from the old style guide, I only removed the parts I noted in the description.
Message was sent while issue was closed.
On 2016/07/12 20:19:45, brettw (ping after 24h) wrote: > https://codereview.chromium.org/2127713004/diff/20001/styleguide/c++/c++.md > File styleguide/c++/c++.md (right): > > https://codereview.chromium.org/2127713004/diff/20001/styleguide/c++/c++.md#n... > styleguide/c++/c++.md:132: ## Logging > Nico: This is what you're referring to I think. The logging advice should be > unchanged from the old style guide, I only removed the parts I noted in the > description. Errrrrrr thanks. Yes, that's what I was looking for. Now that I know where it is, I don't understand how I couldn't find it. |