better deal with CRLF/LF issues

This commit is contained in:
Moritz Raabe
2021-03-19 09:19:50 +01:00
parent c7798b3254
commit 7e0b5236af
3 changed files with 10 additions and 1 deletions

View File

@@ -65,6 +65,8 @@ def main(argv=None):
return 0
else:
logger.info("rule requires reformatting (%s)", rule.name)
if "\r\n" in rule.definition:
logger.info("please make sure that the file uses LF (\\n) line endings only")
return 1
if args.in_place: