Coding conventions for the MongoDB C++ code:
For anything not mentioned here, default to google c++ style guide.
These are very important as we can’t change them easily – Much more than code conventions!
Anything users see – command line options, command names, command output, we need to think hard and carefully about the name to be used, and the exact format and consistency of the items output. For example, serverStatus output is a bit of a mismash of lowercase and camelCase. Let’s fix that over time, starting with new things.
Anything user facing must be run by kernel leads first.
In things like serverStatus, include the units in the stat name if there is any chance of ambiguity. For example:
We should have standards for these – i.e. megabytes should always be MB and not Mb and Megabytes in different places. So the standards are: