Currently for section headings we use fourth level markdown heading
level (####). We do not have levels two or three.
We can use standard incremental levels for heading adornments i.e
1) =========
2) ##
3) ###
ect.
Since this document is likely referenced by maintainers when guiding new
contributors it can save maintainer time to be able to quickly reference
a section in the coding stlye guide. If we add numbers to each heading
(like the kernel stlye guide) then maintainers can say:
Nice patch, please see section 3 of the coding style guide and ...
So, this patch makes two changes
- Use incremental level heading adornments
- Add a number to each section heading
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Heading uses only 3 level header (###) but the rest of the file uses
four (####). We should be uniform.
Use uniform heading level in line with the rest of the file.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
We explicitly state that LXC uses coding style based on Linux kernel
style. It is redundant to then document obvious, and well known, kernel
style rules. Identifier names certainly fall into this category as does
usage of braces.
Remove sections implied by 'kernel style'. Naming conventions and brace
placement conventions.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Current explanation of rules around usage of 'extern' are overly
verbose. It is not necessary to state that functions should be declared
in header files, the compiler already enforces this. These rules are
simple, they are better described with simple statements. An example is
not necessary for such simple rules and serves only to make the document
longer.
Use two simple statements describing the rules that govern function
declaration and the usage of the 'extern' keyword.
Signed-off-by: Tobin C. Harding <me@tobin.cc>
Currently the coding style guide does not mention that we use kernel
coding style as a base style for LXC. We have just linked to
CODING_STLYE.md from CONTRIBUTING (which mentions use of kernel coding
style). We can increase documentation congruence and completeness by
mentioning kernel coding style guide in the introduction to our style
guide.
Add heading and introduction to coding style guide informing readers
that we follow kernel coding style as a base before explaining our style
additions.
Signed-off-by: Tobin C. Harding <me@tobin.cc>