diff --git a/utilities/findMissingIncludeGuards.py b/utilities/findMissingIncludeGuards.py new file mode 100755 index 0000000000000000000000000000000000000000..f2c4561ad1ae24d270e00ee3a692437c2eb52c31 --- /dev/null +++ b/utilities/findMissingIncludeGuards.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import os + +error = False +for root, dirnames, filenames in os.walk(".."): + for filename in filenames: + if filename.endswith((".h")) and not filename.endswith((".impl.h")): + if not "extern" in root: + file = os.path.join(root, filename) + if not "#pragma once" in open(file).read(): + print(file) + error = True + +if error: + exit(-1)