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>;
}
check_include_guards {
path 'include';
path '.';
match '\.h$';
}