Modified: mesos/site/source/documentation/latest/mesos-c++-style-guide.md URL: http://svn.apache.org/viewvc/mesos/site/source/documentation/latest/mesos-c%2B%2B-style-guide.md?rev=1623920&r1=1623919&r2=1623920&view=diff ============================================================================== --- mesos/site/source/documentation/latest/mesos-c++-style-guide.md (original) +++ mesos/site/source/documentation/latest/mesos-c++-style-guide.md Wed Sep 10 07:13:27 2014 @@ -12,10 +12,11 @@ The Mesos codebase follows the [Google C * We use [lowerCamelCase](http://en.wikipedia.org/wiki/CamelCase#Variations_and_synonyms) for variable names (Google uses snake_case, and their class member variables have trailing underscores). ### Constant Names -* We use lowerCamelCase for constant names (Google uses a `k` followed by mixed case, e.g. `kDaysInAWeek`). +* We use [lowerCamelCase](http://en.wikipedia.org/wiki/CamelCase#Variations_and_synonyms) for constant names (Google uses a `k` followed by mixed case, e.g. `kDaysInAWeek`). ### Function Names -* We use lowerCamelCase for function names (Google uses mixed case for regular functions; and their accessors and mutators match the name of the variable). +* We use [lowerCamelCase](http://en.wikipedia.org/wiki/CamelCase#Variations_and_synonyms) for function names (Google uses mixed case for regular functions; and their accessors and mutators match the name of the variable). +* Leave spaces around overloaded operators. e.g. `operator + (...);` rather than `operator+(...);` ## Strings * Strings used in log and error messages should end without a period. @@ -23,8 +24,18 @@ The Mesos codebase follows the [Google C ## Comments * End each sentence with a period. * At most 70 characters per line in comments. +* For trailing comments, leave one space. + +## Breaks +* Break before braces on function, class, struct and union definitions. (Google attaches braces to the surrounding context) ## Indentation + +### Class Format +* Access modifiers are not indented (Google uses one space indentation). +* Constructor initializers are indented by 2 spaces (Google indents by 4). + +### Function Definition/Invocation * Newline when calling or defining a function: indent with 4 spaces. * We do not follow Google's style of wrapping on the open parenthesis, the general goal is to reduce visual "jaggedness" in the code. Prefer (1), (4), (5), sometimes (3), never (2): @@ -59,6 +70,7 @@ allocator->resourcesRecovered( frameworkId, slaveId, resources, filters); </pre> +### Continuation * Newline for an assignment statement: indent with 2 spaces. <pre> @@ -66,7 +78,7 @@ Try<Duration> failoverTimeout = Duration::create(FrameworkInfo().failover_timeout()); </pre> -## New Lines +## Empty Lines * 1 blank line at the end of the file. * Elements outside classes (classes, structs, global functions, etc.) should be spaced apart by 2 blank lines. * Elements inside classes (member variables and functions) should not be spaced apart by more than 1 blank line.
Modified: mesos/site/source/documentation/latest/powered-by-mesos.md URL: http://svn.apache.org/viewvc/mesos/site/source/documentation/latest/powered-by-mesos.md?rev=1623920&r1=1623919&r2=1623920&view=diff ============================================================================== --- mesos/site/source/documentation/latest/powered-by-mesos.md (original) +++ mesos/site/source/documentation/latest/powered-by-mesos.md Wed Sep 10 07:13:27 2014 @@ -28,6 +28,7 @@ layout: documentation * [Oscar Insurance](https://www.hioscar.com/) * [PayPal](https://www.paypal.com) * [Pinkbike](http://www.pinkbike.com) +* [Qubit](http://www.qubitproducts.com) * [Sailthru](http://www.sailthru.com) * [Sharethrough](http://www.sharethrough.com) * [Sigmoid Analytics](http://www.sigmoidanalytics.com/)
