mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
build: specific line with trailing whitespace (#20155)
This commit is contained in:
@@ -46,10 +46,10 @@ def hasTrailingWhiteSpace(filepath, fix):
|
||||
f.close()
|
||||
|
||||
fixed_lines = []
|
||||
for line in lines:
|
||||
for num, line in enumerate(lines):
|
||||
fixed_lines.append(line.rstrip() + '\n')
|
||||
if not fix and line != line.rstrip():
|
||||
print("Trailing whitespace in: " + filepath)
|
||||
print("Trailing whitespace on line {} in file: {}".format(num + 1, filepath))
|
||||
return True
|
||||
if fix:
|
||||
with open(filepath, 'w') as f:
|
||||
|
||||
Reference in New Issue
Block a user