Why is this an issue?
Using include guards, wrapping around the entire content of a header file, is a best practice ensuring that no matter how many times the header is
included in a translation unit, its content will only be seen once.
The include guard pattern is made up of four parts:
#ifndef at the top of the file, with a unique macro name (usually, the name relates to the file’s name to ensure uniqueness).
#define with the same macro name.
- The content of the file
#endif at the end of the file
The rule raises an issue when the name in the second part differs from the first (usually because of a typo or a copy/paste issue).
Noncompliant code example
#define MY_FILE_H // Noncompliant