path: root/scripts/
diff options
authorLukas Bulwahn <>2020-09-26 21:03:54 +0200
committerGreg Kroah-Hartman <>2020-10-02 11:31:26 +0200
commitc5c553850899e2662ecf749ac21fff95d17f59a4 (patch)
tree6f025e0e99db0461d5ae10deeec9529025a004f6 /scripts/
parent5ec4f0ce42210095e633081172a483cc39bac914 (diff)
scripts/ handle license identifiers in XML comments
Commit cc9539e7884c ("media: docs: use the new SPDX header for GFDL-1.1 on *.svg files") adds SPDX-License-Identifiers enclosed in XML comments, i.e., <!-- ... -->, for svg files. Unfortunately, ./scripts/ does not handle SPDX-License-Identifiers in XML comments, so it simply fails on checking these files with 'Invalid License ID: --'. Strip the XML comment ending simply by copying how it was done for comments in C. With that, ./scripts/ handles the svg files properly. Signed-off-by: Lukas Bulwahn <> Signed-off-by: Greg Kroah-Hartman <>
Diffstat (limited to 'scripts/')
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/ b/scripts/
index 6374e078a5f2..bc87200f9c7c 100755
--- a/scripts/
+++ b/scripts/
@@ -180,6 +180,9 @@ class id_parser(object):
# Remove trailing comment closure
if line.strip().endswith('*/'):
expr = expr.rstrip('*/').strip()
+ # Remove trailing xml comment closure
+ if line.strip().endswith('-->'):
+ expr = expr.rstrip('-->').strip()
# Special case for SH magic boot code files
if line.startswith('LIST \"'):
expr = expr.rstrip('\"').strip()