summaryrefslogtreecommitdiff
path: root/scripts/check_crlf.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/check_crlf.py')
-rw-r--r--scripts/check_crlf.py60
1 files changed, 30 insertions, 30 deletions
diff --git a/scripts/check_crlf.py b/scripts/check_crlf.py
index c2f26ba6..e82a6717 100644
--- a/scripts/check_crlf.py
+++ b/scripts/check_crlf.py
@@ -1,30 +1,30 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-"""
- Checker for line endings
- ~~~~~~~~~~~~~~~~~~~~~~~~
-
- Make sure each Python does not use Windows-style file endings.
-
- :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS.
- :license: BSD, see LICENSE for details.
-"""
-
-import sys
-import os
-
-if __name__ == '__main__':
- for directory in sys.argv[1:]:
- if not os.path.exists(directory):
- continue
-
- for root, dirs, files in os.walk(directory):
- for filename in files:
- if not filename.endswith('.py'):
- continue
-
- with open(os.path.join(root, filename), 'rb') as f:
- if b'\r\n' in f.read():
- sys.exit(1)
-
- sys.exit(0)
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""
+ Checker for line endings
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Make sure each Python does not use Windows-style file endings.
+
+ :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+import sys
+import os
+
+if __name__ == '__main__':
+ for directory in sys.argv[1:]:
+ if not os.path.exists(directory):
+ continue
+
+ for root, dirs, files in os.walk(directory):
+ for filename in files:
+ if not filename.endswith('.py') and not filename.endswith('.bashcomp'):
+ continue
+
+ with open(os.path.join(root, filename), 'rb') as f:
+ if b'\r\n' in f.read():
+ sys.exit(1)
+
+ sys.exit(0)