Recently, Markus and Philippe made a great effort [1] to cleanup file entries in
MAINTAINERS that do not match any real file.
Now it's clean, we can ensure it will stay consistent in the future, by checking
those entries are consistent, directly at start of meson.build.
Forcing this through the build system makes sure it can't be skipped, whether on
local machine, or in CI. And since anyone needs to trigger it to add tests, doc
or code, it will be detected as soon as possible.

[1] 
https://lore.kernel.org/qemu-devel/[email protected]/

In terms of performance, it takes 0.26s on a slow machine, where full configure
takes 35s, thus a slow down < 1%: worth it for the consistency we get IMHO.

The first patch cleans up the latest inconsistent entry left, which we solve
pragmatically. Commit mentions another alternative suggested.

The second patch is the check in itself. There was a conversation about
comparing files vs list of files returned by git ls-files. I would prefer to
stick comparing files instead of playing with regex, but I'm open to implement
it another way if that's really important.

The usage is quite simple if you want to play with it manually:
./scripts/check-maintainers-file.py MAINTAINERS

Pierrick Bouvier (2):
  MAINTAINERS: fix entry for 'Python scripts'
  meson.build: check MAINTAINERS file is consistent with source tree

 MAINTAINERS                       |  4 ++-
 meson.build                       |  5 +++
 scripts/check-maintainers-file.py | 53 +++++++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 1 deletion(-)
 create mode 100755 scripts/check-maintainers-file.py

-- 
2.43.0


Reply via email to