Menu

SyntaxStmtCheckIncGuards

Brad Lanam

Wiki Home
Syntax

Syntax: check_include_guards

check_include_guards checks the include files to make sure a guard exists, and that there are no duplicate include guards.

The following pattern is used to check for an include guard.

#ifndef <guard-name>
#define <guard-name>

In the .mkc file, use the following code to check the include guards.

check_include_guards {
  path '<path>';
  # note that the match expression is a full regular expression
  # and not a basic regular expression.
  match <pattern>;
}
Examples
check_include_guards {
  path 'include';
  path '.';
  match '\.h$';
}
Attributes

Wiki Home
Syntax


Related

Wiki: Home
Wiki: Syntax
Wiki: SyntaxAttrPath