Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scripts/spdxcheck: Parse j2 comments correctly

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>
Link: https://lore.kernel.org/r/878qt2xr46.ffs@tglx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Thomas Gleixner and committed by
Greg Kroah-Hartman
634d34e8 c301e1fe

+3
+3
scripts/spdxcheck.py
··· 217 217 # Special case for SH magic boot code files 218 218 if line.startswith('LIST \"'): 219 219 expr = expr.rstrip('\"').strip() 220 + # Remove j2 comment closure 221 + if line.startswith('{#'): 222 + expr = expr.rstrip('#}').strip() 220 223 self.parse(expr) 221 224 self.spdx_valid += 1 222 225 #