tools: add include guard check script
Add `tools/check-include-guard.py`, whose task is to verify that the
include guards in a given file is formatted as we want. Example:
$ ./tools/check-include-guard.py ./src/plugins/ctf/fs-sink/fs-sink-trace.hpp
In `#ifndef BABELTRACE_PLUGIN_CTF_FS_SINK_FS_SINK_TRACE_H` include guard line: expecting `#ifndef BABELTRACE_PLUGINS_CTF_FS_SINK_FS_SINK_TRACE_HPP`
`tools/check-include-guard.py` supports the `--fix` option, which makes
it try to fix the include guards in-place (mostly useful for that
initial pass where we have a lot of stuff to fix).
Add `tools/check-include-guards.sh`, whose task is to find all the
files we want to check include guards for, and call
`tools/check-include-guard.py` on them.
Limitations:
- Only tested on GNU/Linux
Change-Id: I7a376fdcf50f92bda20ab50e529d73bcd2faeb03
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12632
This page took 0.028378 seconds and 4 git commands to generate.