Skip to content

Commit 0e89db0

Browse files
authored
Enforce LF line endings with .gitattributes (#64)
Two files in #60 were committed with CRLF although .editorconfig asks for LF. Git now normalizes every text file to LF on commit and checks it out as LF on every platform, so the editor setting can no longer be bypassed. gradlew.bat keeps CRLF in the working tree. jar and png files are marked binary. Also fix the linguist-generated pattern: the jOOQ sources live under generated/src/, not src/generated/, so the old pattern matched nothing.
1 parent 971582e commit 0e89db0

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@ indent_size = 2
2020
[Makefile*]
2121
indent_style = tab
2222

23+
[*.bat]
24+
end_of_line = crlf
25+
2326
[src/main/resources/default_banner.txt]
2427
insert_final_newline = false

.gitattributes

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,13 @@
1-
src/generated/** linguist-generated
1+
# Line endings: store LF in the repository and check out LF on every platform.
2+
# Git detects binary files itself through text=auto. The entries below are the exceptions.
3+
* text=auto eol=lf
4+
5+
# Windows batch files need CRLF in the working tree.
6+
*.bat text eol=crlf
7+
8+
# Binary files
9+
*.jar binary
10+
*.png binary
11+
12+
# GitHub: mark the jOOQ generated sources as generated (collapsed in diffs, excluded from language statistics).
13+
generated/src/** linguist-generated

0 commit comments

Comments
 (0)