Skip to content

Commit d7b3732

Browse files
committed
Don't exit after the first error in check_crlf.
This makes it easier to find all offending files in a commit, instead of having to only get notified of one file per run.
1 parent 2d40ac0 commit d7b3732

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scripts/check_crlf.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import os
1515

1616
if __name__ == '__main__':
17+
error = False
1718
for directory in sys.argv[1:]:
1819
if not os.path.exists(directory):
1920
continue
@@ -27,6 +28,9 @@
2728
with open(full_path, 'rb') as f:
2829
if b'\r\n' in f.read():
2930
print('CR/LF found in', full_path)
30-
sys.exit(1)
31+
error = True
32+
33+
if error:
34+
sys.exit(1)
3135

3236
sys.exit(0)

0 commit comments

Comments
 (0)