Skip to content

Commit d0ccdc6

Browse files
committed
Manage line ending
Adding gitattributes Update .editorconfigs Signed-off-by: Frederic Pillon <[email protected]>
1 parent 8ebfc7c commit d0ccdc6

File tree

2 files changed

+65
-2
lines changed

2 files changed

+65
-2
lines changed

.editorconfig

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
[*.sh]
2-
# like -i=2
1+
[*]
2+
end_of_line = lf
3+
insert_final_newline = true
34
indent_style = space
45
indent_size = 2
6+
trim_trailing_whitespace = true
57

8+
[*.sh]
69
#shell_variant = posix # like -ln=posix
710
#binary_next_line = true # like -bn
811
switch_case_indent = true # like -ci
912
space_redirects = true # like -sr
1013
#keep_padding = true # like -kp
14+
15+
[*.bat]
16+
end_of_line = crlf

.gitattributes

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Set the default behavior, in case people don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
.editorconfig text eol=lf
7+
.flake8 text eol=lf
8+
.gitattributes text eol=lf
9+
.gitignore text eol=lf
10+
11+
*.1 text eol=lf
12+
*.AUTHORS eol=lf
13+
*.ac text eol=lf
14+
*.am text eol=lf
15+
*.bat text eol=crlf
16+
*.c text eol=lf
17+
*.ChangeLog eol=lf
18+
*.cmake text eol=lf
19+
*.cpp text eol=lf
20+
*.css text eol=lf
21+
*.h text eol=lf
22+
*.html text eol=lf
23+
*.in text eol=lf
24+
*.java text eol=lf
25+
*.json text eol=lf
26+
*.log text eol=lf
27+
*.lsusb text eol=lf
28+
*.md text eol=lf
29+
*.MD text eol=lf
30+
*.mf text eol=lf
31+
*.old text eol=lf
32+
*.patch text eol=lf
33+
*.pde text eol=lf
34+
*.properties text eol=lf
35+
*.py text eol=lf
36+
*.rules text eol=lf
37+
*.s text eol=lf
38+
*.S text eol=lf
39+
*.sh text eol=lf
40+
*.spec text eol=lf
41+
*.txt text eol=lf
42+
*.yml text eol=lf
43+
44+
# Denote all files that are truly binary and should not be modified.
45+
dfu-prefix binary
46+
dfu-suffix binary
47+
dfu-util binary
48+
upload-reset binary
49+
hid-flash binary
50+
*.class binary
51+
*.dll binary
52+
*.exe binary
53+
*.jar binary
54+
*.jpg binary
55+
*.pdf binary
56+
*.png binary
57+

0 commit comments

Comments
 (0)