summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2019-05-19 12:49:34 +0200
committerThomas Gleixner <tglx@linutronix.de>2019-05-19 12:49:34 +0200
commit1a2fa7047b27bab90c6d4bc07463825f6712bc2a (patch)
treec5b327b86c3379905d288433e5e7e371a0089eee
parent01d9d4d751e6281c48915c1b45b5b237d2d4e843 (diff)
downloadspdx-utils-linux-5.2.tar.gz
lcheck: Better normalization and add missing LF for comment patchinglinux-5.2
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rwxr-xr-xlcheck.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/lcheck.py b/lcheck.py
index 402198f..37d7252 100755
--- a/lcheck.py
+++ b/lcheck.py
@@ -62,6 +62,15 @@ def normalize(txt):
l = l.replace(';', ' ').strip()
l = l.replace(':', ' ').strip()
l = l.replace('/', ' ').strip()
+ l = l.replace('(', ' ').strip()
+ l = l.replace(')', ' ').strip()
+ l = l.replace('-', ' ').strip()
+ l = l.replace('"', ' ').strip()
+ l = l.replace('|', ' ').strip()
+ l = l.replace('\'', ' ').strip()
+ l = l.replace('`', ' ').strip()
+ l = l.replace('<', ' ').strip()
+ l = l.replace('>', ' ').strip()
while l.find(' ') >= 0:
l = l.replace(' ', ' ')
@@ -820,7 +829,7 @@ class scanentry(object):
if ls.endswith('*/'):
continue
j += 1
- self.patch.append('/*n')
+ self.patch.append('/*\n')
start_bp_comment = j
continue
# HACK