Add header include guards to files in bulk.
- Go to the root directory of your project.
- Use a glob to filter out the files to be added with include guards.
Example:
cd <project_root>
# Batch add include guards for all header files in `/a/b/`.
npx batch-include-guards "./a/b/**/*.h"
Before:
code
After:
#ifndef A_B_FILENAME_H
#define A_B_FILENAME_H
code
#endif // A_B_FILENAME_H