The shebang lines in some scripts should be ignored when evaluating
license headers.
Change-Id: I7d895cf6b00a6edf8303c229278a262129ec2661
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
if not result:
break
string = re.sub(r'^\s*#+', '', line).strip()
- if bool(re.match('Copyright', string, re.I)): # Ignore the Copyright line
+ if (bool(re.match('Copyright', string, re.I)) # Ignore the Copyright line
+ or bool(re.match('^#!', line, re.I))): # Ignore #! shebang lines
continue
text += ' {}'.format(string)
# Strip unnecessary spacing