Skip to content

Timmmm/GuardChecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

GuardChecker

This is a very very very simple and hacky program for checking whether C/C++ header files have C++ include guards like this:

#ifdef __cplusplus
extern "C" {
#endif

and

#ifdef __cplusplus
}
#endif

It uses some very sketchy regexes to find those lines, and then if they are not present it tries to insert them. It uses further sketchy regexes to find the normal header include guards and inserts the __cplusplus ones inside them.

It modifies files without asking so I highly recommend you only use it on code tracked by version control. It's also pretty hacky so I suggest you at least skim the results!

Usage is trivial:

./GuardChecker <path>

It will check all files ending in .h

About

C++ include guard checker; created for mynewt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages