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
This commit is contained in:
@@ -48,6 +48,6 @@ def check(conf, line):
|
|||||||
yield LintProblem(1, line.end - line.start + 1,
|
yield LintProblem(1, line.end - line.start + 1,
|
||||||
'wrong new line character: expected \\r\\n')
|
'wrong new line character: expected \\r\\n')
|
||||||
else:
|
else:
|
||||||
if line.buffer[line.end] == '\r':
|
if line.buffer[line.end] != '\n':
|
||||||
yield LintProblem(1, line.end - line.start + 1,
|
yield LintProblem(1, line.end - line.start + 1,
|
||||||
'wrong new line character: expected \\n')
|
'wrong new line character: expected \\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user