I ran into noisy whitespace-only diffs while making a small change in the test suite, and it looks like the repository does not currently define a clear line ending policy.
What I observed:
- make format only runs
poetry run ruff check . --fix from Makefile, so it does not normalize line endings
- line endings are only handled in pre-commit via mixed-line-ending
.pre-commit-config.yaml does not pass an explicit --fix=lf or --fix=crlf, so the hook uses auto behaviour
- in at least one case, pre-commit settled a Python file to CRLF, which makes the intended repo standard unclear
Why this matters:
- small changes can produce unrelated whitespace-only diffs
- contributors may get different results from make format vs pre-commit
- review noise increases, especially for focused PRs
Suggested fix:
- choose a repo-wide line ending standard explicitly, likely LF
- enforce it in source control, ideally with
.gitattributes
- optionally also add
.editorconfig so editors default to the same convention
- make pre-commit match that policy explicitly, for example by configuring mixed-line-ending with --fix=lf
I ran into noisy whitespace-only diffs while making a small change in the test suite, and it looks like the repository does not currently define a clear line ending policy.
What I observed:
poetry run ruff check . --fixfrom Makefile, so it does not normalize line endings.pre-commit-config.yamldoes not pass an explicit --fix=lf or --fix=crlf, so the hook uses auto behaviourWhy this matters:
Suggested fix:
.gitattributes.editorconfigso editors default to the same convention