]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Add an include-checking script
authorTom Tromey <tromey@adacore.com>
Wed, 17 Apr 2024 20:11:45 +0000 (14:11 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 18 Dec 2024 17:00:44 +0000 (10:00 -0700)
commit0dad0d7b084cb1ea771da0be579ef6ea0a7725f6
tree04871da39a29b14a92d4c0723a23748beeca74fa
parent3a41d62678ef8c8947d4c62997f6f54f0c747b56
Add an include-checking script

This adds a new Python script that checks the header guards of all gdb
source files.  It enforces a fairly strict formatting and naming
scheme.

In particular, for a file "x/y-z.h" (relative to the repository root),
the include guard will be named "X_Y_Z_H".  Only the '#ifndef' form is
allowed, not "#if !defined(...)".  The trailing comment on the
"#endif" is also required.

The script also tries to update files that appear to have the required
lines if they are in the wrong form or use the wrong name.

Reviewed-By: Tom de Vries <tdevries@suse.de>
gdb/check-include-guards.py [new file with mode: 0755]