We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95e17b3 commit c544e22Copy full SHA for c544e22
yamllint/rules/new_lines.py
@@ -51,8 +51,8 @@ def check(conf, line):
51
elif conf['type'] == 'dos':
52
newline_char = '\r\n'
53
54
- if line.start == 0 and len(line.buffer) > line.end:
+ if len(line.buffer) > line.end:
55
if line.buffer[line.end:line.end + len(newline_char)] != newline_char:
56
c = repr(newline_char).strip('\'')
57
- yield LintProblem(1, line.end - line.start + 1,
+ yield LintProblem(line.line_no, line.end - line.start + 1,
58
f'wrong new line character: expected {c}')
0 commit comments