chore: 添加 EditorConfig 和 GitAttributes 配置文件

This commit is contained in:
Ray.Hao
2026-02-28 18:01:27 +08:00
parent 5048bf460e
commit e877ba125b
2 changed files with 49 additions and 0 deletions

35
.editorconfig Normal file
View File

@@ -0,0 +1,35 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
# Java files
[*.java]
indent_style = space
indent_size = 4
# XML files
[*.xml]
indent_style = space
indent_size = 4
# YAML files
[*.{yml,yaml}]
indent_style = space
indent_size = 2
# Properties files
[*.properties]
indent_style = space
indent_size = 4
# Markdown files
[*.md]
trim_trailing_whitespace = false

14
.gitattributes vendored Normal file
View File

@@ -0,0 +1,14 @@
# Auto detect text files and perform LF normalization
* text=auto eol=lf
# Java files
*.java text eol=lf
*.xml text eol=lf
# Config files
*.yml text eol=lf
*.yaml text eol=lf
*.properties text eol=lf
# Shell scripts
*.sh text eol=lf