diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2016-11-07 13:54:52 -0600 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2016-12-05 16:46:14 +0000 |
commit | 31f951b3a47735330b7a1fdcae2e9bb6757965d5 (patch) | |
tree | fa24a638d0698234ea321161b85c7a97019a0f24 /contributing.md | |
parent | e1712f320914e14f456f3921e7ab0d748c79622d (diff) | |
download | openbmc-docs-31f951b3a47735330b7a1fdcae2e9bb6757965d5.tar.gz openbmc-docs-31f951b3a47735330b7a1fdcae2e9bb6757965d5.zip |
cpp-style: define style guidelines in-depth
The original set of C++ style guidelines were arguably insufficient
for teams of diverse backgrounds. Attempt to formalize these guidelines
and specify in more depth.
Change-Id: I22253f7b9de91d693c33d55d612c3555fa5b219f
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Diffstat (limited to 'contributing.md')
-rw-r--r-- | contributing.md | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/contributing.md b/contributing.md index e97625b..7837a43 100644 --- a/contributing.md +++ b/contributing.md @@ -73,26 +73,7 @@ This style can mostly be verified with 'astyle' as follows: ### C++ -Being an extensive and complicated language, there are often differences of -opinions on "good" and "bad" C++ code. The following are the approaches -favored within the OpenBMC projects: - - 1. Favor syntax and techniques from the latest available C++ standard, - currently C++14. - 2. Rely on well-recognized opinions on best practices: - 1. C++ Core Guidelines - https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md - 2. Effective Modern C++ - http://www.aristeia.com/books.html - 3. Give preference to style decisions from the Google C++ Style Guide - - https://google.github.io/styleguide/cppguide.html - -In order to meet the chosen style for C++ code, files should pass through -'astyle' unchanged when called as follows: - - astyle --style=allman --add-brackets --convert-tabs --max-code-length=80 \ - --indent=spaces=4 --indent-classes --indent-switches --indent-labels \ - --indent-preproc-define --min-conditional-indent=0 --pad-oper \ - --pad-header --unpad-paren --break-after-logical \ - --align-pointer=type --align-reference=type +See [C++ Style and Conventions](./cpp-style-and-conventions.md). Submitting changes ------------------ |