Fix lint script

This commit is contained in:
Michelle Linington 2021-10-07 20:39:46 -07:00
parent ce8f0a8b0b
commit d2de17afb9
2 changed files with 8 additions and 3 deletions

View File

@ -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 {

View File

@ -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