Skip to content

Commit 8352163

Browse files
committed
Update coding standard with include-ordering rule
1 parent ba73db3 commit 8352163

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CODING_STANDARD.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ Here a few minimalistic coding rules for the CPROVER source tree.
103103
- Prefer forward declaration to includes, but forward declare at the top of the
104104
header file rather than in line
105105
- Guard headers with `#ifndef CPROVER_DIRECTORIES_FILE_H`, etc
106+
- The corresponding header for a given source file should always be the *first*
107+
include in the source file. For example, given `foo.h` and `foo.cpp`, the
108+
line `#include "foo.h"` should precede all other include statements in
109+
`foo.cpp`.
106110
107111
# Makefiles
108112
- Each source file should appear on a separate line

0 commit comments

Comments
 (0)