summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/build/check_include_guards.py
diff options
context:
space:
mode:
author angelosa <lordkale4@gmail.com>2025-03-07 19:12:26 +0100
committer angelosa <lordkale4@gmail.com>2025-03-07 19:12:26 +0100
commit91f7db1c686ab9b79fa822a76fc7eb7c6bc45f64 (patch)
tree4587c30aca7d7dbda9365876011dda748ae7b013 /scripts/build/check_include_guards.py
parent98b3a1c07526a04ba61ea83273fa8f454006b0d9 (diff)
scripts/build/check_include_guards.py: bail if no argument specified
Diffstat (limited to 'scripts/build/check_include_guards.py')
-rwxr-xr-xscripts/build/check_include_guards.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/build/check_include_guards.py b/scripts/build/check_include_guards.py
index f294cc6412f..bcc1bd889e9 100755
--- a/scripts/build/check_include_guards.py
+++ b/scripts/build/check_include_guards.py
@@ -28,6 +28,10 @@ if __name__ == '__main__':
substpat = re.compile('[-.]')
guardpat = re.compile('^ *# *ifndef +([^\s]+)(\s+.*)?')
bad = False
+ if len(sys.argv) < 2:
+ sys.stderr.write("Error: requires at least one path defined\n")
+ sys.exit(2)
+
for root in sys.argv[1:]:
for path, subdirs, files in os.walk(root):
prefix = 'MAME_' + '_'.join([n.upper() for n in pathsplit(os.path.relpath(path, root))]) + '_'