Closed AFulgens closed 5 months ago
it's been decades since anything used cr as eol. it is unsupported intentionally
I guess, we are the only team in the world then working on legacy software, which is generating XMLs with CR as EOL and we must parse it in modern codebase, and thus have tests for it. Nevertheless, I appreciate your answer, onto the exclude
list with those test XMLs for this hook! 🏴☠️
if you have generated files you probably don't want to lint them anyway
Currently the
trailing-whitespace
hook (trailing_whitespace_fixer.py
) handles the end-of-line (EOL) combinations of:However, files that use CR as EOL are handled incorrectly by the hook, and in combanation with EOF-Fixer (
end_of_file_fixer.py
) this makes it impossible to commit the file if both hooks are active, because:(Or the other way around, depending on order of the hooks.)
Current workarounds:
Question: Would it be OK to handle
\r
the same way\n
and\r\n
are handled intrailing_whitespace_fixer.py
? If yes, I'll gladly prepare a PR.