Skip to content

Commit 24d0a7e

Browse files
authored
Add .editorconfig and .gitattributes files for automatic settings (godotengine#4700)
This smoothens the contribtor experience by automatically configuring editors that support EditorConfig. The `.gitattributes` file ensures that all files use LF line endings when committed to Git.
1 parent b8bda4b commit 24d0a7e

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.editorconfig

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 4
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
# YAML requires indentation with spaces instead of tabs.
12+
[*.{js,yml,yaml}]
13+
indent_style = space
14+
indent_size = 2
15+
16+
# Makefile requires tab indentation.
17+
[Makefile]
18+
indent_style = tab
19+
indent_size = 4

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Properly detect languages on GitHub
22
*.rst linguist-detectable=true
3+
4+
# Normalize EOL for all files that Git considers text files
5+
* text=auto eol=lf

0 commit comments

Comments
 (0)