This is hugely expanded an update of https://lists.nongnu.org/archive/html/qemu-devel/2025-05/msg02040.html
In that series, Peter suggested creating standalone methods to act as hooks to call when detecting the start/end of a file in a diff. This implements that idea and adapts a number of existing checks to use the new hooks. Changed in v3: - Add check for redundent license boilerplate text - Fix check for Makefile names Daniel P. Berrangé (9): Revert "scripts: mandate that new files have SPDX-License-Identifier" scripts/checkpatch.pl: fix various indentation mistakes scripts/checkpatch: introduce tracking of file start/end scripts/checkpatch: use new hook for ACPI test data check scripts/checkpatch: use new hook for file permissions check scripts/checkpatch: expand pattern for matching makefiles scripts/checkpatch: use new hook for MAINTAINERS update check scripts/checkpatch: reimplement mandate for SPDX-License-Identifier scripts/checkpatch: reject license boilerplate on new files scripts/checkpatch.pl | 381 +++++++++++++++++++++++++++--------------- 1 file changed, 243 insertions(+), 138 deletions(-) -- 2.49.0