]> www.infradead.org Git - users/jedix/linux-maple.git/commit
scripts/spdxcheck: Handle license identifiers in Jinja comments
authorLukas Bulwahn <lukas.bulwahn@redhat.com>
Wed, 8 Jan 2025 12:52:07 +0000 (13:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jan 2025 14:38:33 +0000 (15:38 +0100)
commit154916f4b59dc2228caad5fc98e9e6a7e1a84e19
treea2f3fa62ea4a9d950c830ecff6bc42830834a4a5
parent634d34e856ca0123f96613ffaf1852a1d3b46880
scripts/spdxcheck: Handle license identifiers in Jinja comments

Commit 4b132aacb076 ("tools: Add xdrgen") adds a tool, which uses Jinja
template files, i.e., files with the j2 file extension, for its lightweight
code generation.

These template files for this tool have proper headers with the SPDX
License information, which are included as Jinja comments by enclosing the
text with '{#' and '#}'. Sofar, the spdxcheck script does not support to
properly parse this license information in Jinja comments and it reports
back with 'Invalid token: #}'.

Parse Jinja comments properly by stripping the known Jinja comment suffix.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@redhat.com>
Link: https://lore.kernel.org/r/20250108125207.57486-1-lukas.bulwahn@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/spdxcheck.py