Skip to content

A shell script for validating C++ header file (.h, .hh, .hpp) header guards

License

Notifications You must be signed in to change notification settings

niklasva/guardcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

A shell script for validating C++ header file (.h, .hh, .hpp) header guards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages