Fix bug with CRLF in new-lines and require-starting-space
Pound-signs followed by a lone CRLF should not raise if require-starting-space is specified. If require-starting-space is true, *and* either: - new-lines: disbale, or - newlines: type: dos is specified, a line with `#\r` or `#\r\n` should not raise a false positive. This commit also uses a Set for O(1) membership testing and uses the correct escape sequence for the nul byte. If we find a CRLF when looking for Unix newlines, yamllint should always raise, regardless of logic with require-starting-space. Closes: Issue #171.pull/264/head
parent
278a79f093
commit
512fe17047
Loading…
Reference in New Issue