From ee4f9c500e3e83d35b08fbb5c40852f15146923e Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 6 Sep 2026 11:28:15 +0200 Subject: [PATCH] Fix REUSE compliance failure in gen_hedley_undef_check.cmake The generated file's embedded banner contains the literal text 'SPDX-License-Identifier: MIT' as part of the *content* being written to hedley_undef.hpp, not as this .cmake script's own REUSE header (it is already covered by the blanket 'Files: *' rule in .reuse/dep5). The reuse tool matched that embedded line as an SPDX tag for the script itself and failed to parse the trailing 'MIT\n")' as a valid SPDX License Expression, breaking ci_reuse_compliance. Wrap the embedded banner in REUSE-IgnoreStart/REUSE-IgnoreEnd comments, as recommended by the tool's own diagnostic output. Signed-off-by: Niels Lohmann --- cmake/scripts/gen_hedley_undef_check.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/scripts/gen_hedley_undef_check.cmake b/cmake/scripts/gen_hedley_undef_check.cmake index 225f311f6..fc8cfec2c 100644 --- a/cmake/scripts/gen_hedley_undef_check.cmake +++ b/cmake/scripts/gen_hedley_undef_check.cmake @@ -62,6 +62,12 @@ set(generated "") if(MODE STREQUAL "undef") # Same banner `make update_hedley_undef` would stamp by hand, so the # recipe is self-contained and its output is byte-stable across reruns. + # The embedded SPDX tags below are part of the *generated* file's + # content, not a REUSE header for this .cmake script itself (which is + # already covered by the blanket "Files: *" rule in .reuse/dep5) -- keep + # them wrapped in REUSE-IgnoreStart/End so `reuse lint` does not try to + # parse "MIT\n")" as this file's own SPDX-License-Identifier value. + # REUSE-IgnoreStart string(APPEND generated "// __ _____ _____ _____\n") string(APPEND generated "// __| | __| | | | JSON for Modern C++\n") string(APPEND generated "// | | |__ | | | | | | version 3.12.0\n") @@ -69,6 +75,7 @@ if(MODE STREQUAL "undef") string(APPEND generated "//\n") string(APPEND generated "// SPDX-FileCopyrightText: 2013-2026 Niels Lohmann \n") string(APPEND generated "// SPDX-License-Identifier: MIT\n") + # REUSE-IgnoreEnd string(APPEND generated "\n") string(APPEND generated "#pragma once\n") string(APPEND generated "\n")