Skip to content

Commit

Permalink
Mention core.autocrlf != false pitfall
Browse files Browse the repository at this point in the history
  • Loading branch information
amesgen authored and mrkkrp committed Sep 24, 2021
1 parent d14132e commit 1187a81
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1187a81

Please sign in to comment.