Skip to content

Commit f9f633e

Browse files
committed
EditorConfig
Add `.editorconfig` and `.gitattributes` settings to enforce code styles consistency across different editors and IDEs.
1 parent 849bf54 commit f9f633e

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.editorconfig

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# https://editorconfig.org
2+
3+
root = true
4+
5+
6+
## Repository Configurations
7+
############################
8+
[.{git*,editorconfig,*.yml}]
9+
end_of_line = lf
10+
indent_style = space
11+
indent_size = unset
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
insert_final_newline = true
15+
16+
[.gitmodules]
17+
indent_style = tab
18+
19+
20+
## Markdown GFM
21+
###############
22+
[*.md]
23+
indent_style = space
24+
indent_size = unset
25+
end_of_line = unset
26+
charset = utf-8
27+
trim_trailing_whitespace = true
28+
insert_final_newline = true
29+
30+
31+
## C Source Files
32+
#################
33+
[*.{c,h}]
34+
indent_style = space
35+
indent_size = 4
36+
end_of_line = unset
37+
charset = utf-8
38+
trim_trailing_whitespace = true
39+
insert_final_newline = true

.gitattributes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
## Repository Configuration
3+
###########################
4+
.editorconfig text eol=lf
5+
.gitattributes text eol=lf
6+
.gitignore text eol=lf

0 commit comments

Comments
 (0)