1
1
mirror of https://github.com/tweag/ormolu.git synced 2024-09-11 21:27:46 +03:00

Mention core.autocrlf != false pitfall

This commit is contained in:
amesgen 2021-09-24 17:38:57 +02:00 committed by Mark Karpov
parent d14132ecd3
commit 1187a81f21

View File

@ -114,6 +114,14 @@ To check if files are are already formatted (useful on CI):
$ ormolu --mode check $(find . -name '*.hs')
```
#### :zap: Beware git's `core.autocrlf` on Windows :zap:
Ormolu's output always uses LF line endings. In particular,
`ormolu --mode check` will fail if its input is correctly formatted
*except* that it has CRLF line endings. This situation can happen on Windows
when checking out a git repository without having set [`core.autocrlf`](
https://www.git-scm.com/docs/git-config#Documentation/git-config.txt-coreautocrlf)
to `false`.
### Editor integration
We know of the following editor integrations: