Include guards shall be provided
Include guards shall be provided.
The checker raises a violation if a header file does not contain an include guard.
For instance, this code uses an include guard for the #define
and #include statements and does not violate the
rule:
// Contents of a header file #ifndef FILE_H #define FILE_H #include "libFile.h" #endif
If you expect a rule violation but do not see it, refer to Coding Standard Violations Not Displayed.
| Group: Preprocessing Directives |
| Category: Required |