npm.io
0.0.2 • Published 6 years agoCLI

batch-include-guards

Licence
MIT
Version
0.0.2
Deps
2
Size
7 kB
Vulns
0
Weekly
0

batch-include-guards

Add header include guards to files in bulk.

Usage

  • 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

Keywords