0.6.0
Added
-
A
byte-order-markrule.
A file that starts with a UTF-8 byte order mark, as Windows PowerShell writes, now has it reported and removed.
The same character elsewhere in the document is a zero width no-break space rather than a byte order mark, so it is left alone. -
A
line-endingsrule.
A file that mixes LF and CRLF endings now has the minority endings reported and rewritten to the file's own majority style, with LF settling a tie.
The rule takes no side between the two, so a file that is wholly LF or wholly CRLF is left exactly as it is.
Fixed
- Fixers that insert a line ending now follow the document's majority style.
Previously a single CRLF anywhere in an otherwise LF file made every inserted line ending a CRLF. formatno longer carries a leading byte order mark into the document text.
Any fix that rewrote the first line moved the mark past it, so a title fixed to# Titlesilently began with an invisible character, and the file then passedlintclean.lint --format githubnow reports paths with forward slashes.
On a Windows runner the backslashes meant GitHub could not match the path against the repository, so the annotation never attached to the diff.