11Here a few minimalistic coding rules for the CPROVER source tree.
22
33# Whitespaces
4+
5+ Formatting is enforced using clang-format. For more information about this, see
6+ ` COMPILING.md ` . A brief summary of the formatting rules is given below:
7+
48- Use 2 spaces indent, no tabs.
59- No lines wider than 80 chars.
610 - When line is wider, do the following:
@@ -16,8 +20,7 @@ Here a few minimalistic coding rules for the CPROVER source tree.
1620 even if the outer function call does.
1721- If a method is bigger than 50 lines, break it into parts.
1822- Put matching ` { } ` into the same column.
19- - No spaces around operators (` = ` , ` + ` , ` == ` ...) Exceptions: Spaces around
20- ` && ` , ` || ` and ` << `
23+ - Spaces around binary operators (` = ` , ` + ` , ` == ` ...)
2124- Space after comma (parameter lists, argument lists, ...)
2225- Space after colon inside ` for `
2326- For pointers and references, the ` * ` /` & ` should be attached to the variable
@@ -27,10 +30,10 @@ Here a few minimalistic coding rules for the CPROVER source tree.
2730- No whitespaces in blank lines
2831- Put argument lists on next line (and indent 2 spaces) if too long
2932- Put parameters on separate lines (and indent 2 spaces) if too long
30- - No whitespaces around colon for inheritance, put inherited into separate
31- lines in case of multiple inheritance
32- - The initializer list follows the constructor without a whitespace around the
33- colon. Break line after the colon if required and indent members.
33+ - Spaces around colon for inheritance, put inherited into separate lines in
34+ case of multiple inheritance
35+ - The initializer list follows the constructor with a whitespace around the
36+ colon.
3437- ` if(...) ` , ` else ` , ` for(...) ` , ` do ` , and ` while(...) ` are always in a
3538 separate line
3639- Break expressions in ` if ` , ` for ` , ` while ` if necessary and align them with
0 commit comments