Report failing filenames when --fix=no in mixed-line-endings
diff --git a/pre_commit_hooks/mixed_line_ending.py b/pre_commit_hooks/mixed_line_ending.py
index a163726..cd0c125 100644
--- a/pre_commit_hooks/mixed_line_ending.py
+++ b/pre_commit_hooks/mixed_line_ending.py
@@ -37,9 +37,15 @@
# Some amount of mixed line endings
mixed = sum(bool(x) for x in counts.values()) > 1
- if fix == 'no' or (fix == 'auto' and not mixed):
+ if fix == 'no':
+ if mixed:
+ # Not fixing, just report problematic file
+ print('Mixed line endings: {filename}'.format(filename=filename))
return mixed
+ if fix == 'auto' and not mixed:
+ return False
+
if fix == 'auto':
max_ending = LF
max_lines = 0