diff --git a/CODINGSTYLE.md b/CODINGSTYLE.md index 32866d4e826431927a84585a9033244336135765..6b44c414fbed2bf5649d500d6ceb5294b681207a 100644 --- a/CODINGSTYLE.md +++ b/CODINGSTYLE.md @@ -1,5 +1,8 @@ # OSv Coding Style -This document describe OSv coding style. + +This is a coding style guide for OSv. It is meant to be helpful, not a tool +for bikeshedding patches on the mailing list. The use of common sense when +applying these rules is required. ## 1. Indentation and layout 1.1 We use 4 spaces for indentation, no tabs. @@ -55,6 +58,13 @@ template and its paramters. int& b; ... +Please note that the rule obviously does not make sense when multiple variables +are declared on the same line. In such cases, it is preferable to do: + +... + int *a, *b; +... + ## 3. Braces 3.1 Always use curly braces for if statement, even if it is a one line if.