Skip to content

Latest commit

 

History

History
58 lines (38 loc) · 1.06 KB

README.org

File metadata and controls

58 lines (38 loc) · 1.06 KB

guardcheck

guardcheck is a shell script that verifies header guard correctness in C++ header files (.h, .hh, .hpp).

Usage

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

Installation

  1. Clone the repository:
git clone https://github.com/niklasva/guardcheck.git
  1. Navigate to the directory:
cd guardcheck
  1. Make the script executable:
chmod +x guardcheck.sh

Example

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

License

This project is licensed under the GNU General Public License v3.0.