| # Copyright (c) 2021 Raspberry Pi (Trading) Ltd. |
| # SPDX-License-Identifier: BSD-3-Clause |
| # Little script to check that every \ingroup has a matching \defgroup |
| # Run from the root of the tree to check |
| res = subprocess.run(['git', 'grep', '\\defgroup'], check=True, stdout=subprocess.PIPE) |
| for line in res.stdout.decode('utf8').split('\n'): |
| m = re.match(r'^(\S+):.*\\defgroup\s+(\w+)', line) |
| if os.path.basename(filename) in ('check_doxygen_groups.py', 'index.h'): |
| print("{} uses \\defgroup {} but so does {}".format(groups[group], group, filename)) |
| res = subprocess.run(['git', 'grep', '\\ingroup'], check=True, stdout=subprocess.PIPE) |
| for line in res.stdout.decode('utf8').split('\n'): |
| m = re.match(r'^(\S+):.*\\ingroup\s+(\w+)', line) |
| if os.path.basename(filename) in ('check_doxygen_groups.py', 'index.h'): |
| print("{} uses \\ingroup {} which was never defined".format(filename, group)) |