From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH] scripts/spdxcheck: Parse j2 comments correctly
Date: Fri, 29 Nov 2024 11:37:45 +0100 [thread overview]
Message-ID: <878qt2xr46.ffs@tglx> (raw)
j2 files use '#}' as comment closure, which trips up the SPDX
parser:
tools/.../definition.j2: 1:36 Invalid token: #}
Handle those comments correctly by removing the closure.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
scripts/spdxcheck.py | 3 +++
1 file changed, 3 insertions(+)
--- a/scripts/spdxcheck.py
+++ b/scripts/spdxcheck.py
@@ -217,6 +217,9 @@ import os
# Special case for SH magic boot code files
if line.startswith('LIST \"'):
expr = expr.rstrip('\"').strip()
+ # Remove j2 comment closure
+ if line.startswith('{#'):
+ expr = expr.rstrip('#}').strip()
self.parse(expr)
self.spdx_valid += 1
#
reply other threads:[~2024-11-29 10:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878qt2xr46.ffs@tglx \
--to=tglx@linutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox