new-lines: explicitly check \n for type: unix

To be more consistent with the other types, unix now also checks against
the expected newline character (`\n`) instead of checking if a wrong
character (`\r`) is present
pull/477/head
Jan Wille 3 years ago committed by Adrien Vergé
parent 695fc5f1f1
commit af843b675a

@ -48,6 +48,6 @@ def check(conf, line):
yield LintProblem(1, line.end - line.start + 1,
'wrong new line character: expected \\r\\n')
else:
if line.buffer[line.end] == '\r':
if line.buffer[line.end] != '\n':
yield LintProblem(1, line.end - line.start + 1,
'wrong new line character: expected \\n')

Loading…
Cancel
Save