guardcheck is a shell script that verifies header guard correctness in C++ header files (.h, .hh, .hpp).
Usage: guardcheck [-r] [-v] [-h] [-d path] file
-d: source root directory
-r: recursively check files
-v: enable verbose mode
-h: display this help message
- Clone the repository:
git clone https://github.com/niklasva/guardcheck.git
- Navigate to the directory:
cd guardcheck
- Make the script executable:
chmod +x guardcheck.sh
To check a single file:
./guardcheck.sh my_header.hpp
To recursively check all header files in a directory:
./guardcheck.sh -r -v /path/to/directory
To check a file relative to a specific root folder:
./guardcheck.sh -d ./src/root my_header.hpp
This project is licensed under the GNU General Public License v3.0.