linter: Do not lint scripts parsed with tail (like dev-motd).

This commit is contained in:
Rohitt Vashishtha 2019-05-25 19:57:05 +05:30 committed by Tim Abbott
parent 9e86a8b4d4
commit eb44b7d69d
1 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,8 @@ def get_ftype(fpath, use_shebang):
return 'js'
elif re.search(r'^#!.*\bruby', first_line):
return 'rb'
elif re.search(r'^#!.*\btail', first_line):
return '' # do not lint these scripts.
elif re.search(r'^#!', first_line):
print('Error: Unknown shebang in file "%s":\n%s' % (fpath, first_line), file=sys.stderr)
return ''