Fix lint script
This commit is contained in:
parent
ce8f0a8b0b
commit
d2de17afb9
@ -1,9 +1,8 @@
|
||||
#!/usr/bin/env xcrun --sdk macosx swift
|
||||
//
|
||||
// Copyright (c) 2021 Open Whisper Systems. All rights reserved.
|
||||
//
|
||||
|
||||
#!/usr/bin/env xcrun --sdk macosx swift
|
||||
|
||||
import Foundation
|
||||
|
||||
class EmojiGenerator {
|
||||
|
||||
@ -336,6 +336,12 @@ def process(filepath):
|
||||
text = sort_class_statements(filepath, filename, file_ext, text)
|
||||
|
||||
lines = text.split('\n')
|
||||
|
||||
shebang = ""
|
||||
if lines[0].startswith('#!'):
|
||||
shebang = lines[0] + '\n'
|
||||
lines = lines[1:]
|
||||
|
||||
while lines and lines[0].startswith('//'):
|
||||
lines = lines[1:]
|
||||
text = '\n'.join(lines)
|
||||
@ -348,7 +354,7 @@ def process(filepath):
|
||||
''' % (
|
||||
datetime.datetime.now().year,
|
||||
)
|
||||
text = header + text + '\n'
|
||||
text = shebang + header + text + '\n'
|
||||
|
||||
if original_text == text:
|
||||
return
|
||||
|
||||
Loading…
Reference in New Issue
Block a user